Skip to content

Instantly share code, notes, and snippets.

@ahpook
Last active August 29, 2015 13:57
Show Gist options
  • Save ahpook/9496823 to your computer and use it in GitHub Desktop.
Save ahpook/9496823 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'yaml'
bar = [ { 'key1a' => 'value1_0', 'key1b' => 'value1_1' },
'key2',
'key3',
{ 'key4a' => 'value4_0', 'key4b' => 'value4_1' }
]
puts bar[0]['key1a']
puts bar.to_yaml
value1_0
---
- key1a: value1_0
key1b: value1_1
- key2
- key3
- key4a: value4_0
key4b: value4_1
include foo
class foo {
$bar = { 'key1' => 'value_a',
'key2' => [ 'value_b_0', 'value_b_1' ] }
notice("hi ${foo::bar['key1']} ${foo::bar['key2'][0]}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment