diff options
Diffstat (limited to 'lib/chef/mixin/powershell_type_coercions.rb')
-rw-r--r-- | lib/chef/mixin/powershell_type_coercions.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/mixin/powershell_type_coercions.rb b/lib/chef/mixin/powershell_type_coercions.rb index 60c04e85ae..381cbed637 100644 --- a/lib/chef/mixin/powershell_type_coercions.rb +++ b/lib/chef/mixin/powershell_type_coercions.rb @@ -23,14 +23,14 @@ class Chef def type_coercions @type_coercions ||= { - Fixnum => { :type => lambda { |x| x.to_s }}, - Float => { :type => lambda { |x| x.to_s }}, - FalseClass => { :type => lambda { |x| "$false" }}, - TrueClass => { :type => lambda { |x| "$true" }}, - Hash => {:type => Proc.new { |x| translate_hash(x)}}, - Array => {:type => Proc.new { |x| translate_array(x)}}, - Chef::Node::ImmutableMash => {:type => Proc.new { |x| translate_hash(x)}}, - Chef::Node::ImmutableArray => {:type => Proc.new { |x| translate_array(x)}}, + Fixnum => { :type => lambda { |x| x.to_s } }, + Float => { :type => lambda { |x| x.to_s } }, + FalseClass => { :type => lambda { |x| "$false" } }, + TrueClass => { :type => lambda { |x| "$true" } }, + Hash => { :type => Proc.new { |x| translate_hash(x) } }, + Array => { :type => Proc.new { |x| translate_array(x) } }, + Chef::Node::ImmutableMash => { :type => Proc.new { |x| translate_hash(x) } }, + Chef::Node::ImmutableArray => { :type => Proc.new { |x| translate_array(x) } }, } end @@ -49,7 +49,7 @@ class Chef private def translate_hash(x) - translated = x.inject([]) do |memo, (k,v)| + translated = x.inject([]) do |memo, (k, v)| memo << "#{k}=#{translate_type(v)}" end "@{#{translated.join(';')}}" |