24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/chef/mixin/powershell_type_coercions.rb', line 24
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) } },
}
end
|