Skip to content

Instantly share code, notes, and snippets.

@pburkholder
Created November 22, 2014 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pburkholder/3e2ef1182d28457a3e8d to your computer and use it in GitHub Desktop.
Save pburkholder/3e2ef1182d28457a3e8d to your computer and use it in GitHub Desktop.
11.10.4 chef-client YAML dump of ImmutableArray
puts YAML.dump({ 'instances' => @immutable_array_of_mashes.map { |item| item.to_hash }})
---
instances:
- m: m
- b: b
- top: !ruby/hash:Chef::Node::ImmutableMash
second_level: some value
top_level_2: !ruby/array:Chef::Node::ImmutableArray
- array
- of
- values
top_level_3: !ruby/array:Chef::Node::ImmutableArray
- !ruby/hash:Chef::Node::ImmutableMash
hash_array: 1
hash_array_b: 2
top_level_4: !ruby/hash:Chef::Node::ImmutableMash
level2: !ruby/hash:Chef::Node::ImmutableMash
key: value
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment