Module: Chef::Node::Immutablize
- Included in:
- Attribute, ImmutableArray, ImmutableMash
- Defined in:
- lib/chef/node/immutable_collections.rb
Instance Method Summary collapse
Instance Method Details
#immutablize(value) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/chef/node/immutable_collections.rb', line 6 def immutablize(value) case value when Hash ImmutableMash.new(value) when Array ImmutableArray.new(value) else value end end |