Last active
August 29, 2015 13:57
-
-
Save ahpook/9496823 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value1_0 | |
--- | |
- key1a: value1_0 | |
key1b: value1_1 | |
- key2 | |
- key3 | |
- key4a: value4_0 | |
key4b: value4_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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