Skip to content

Instantly share code, notes, and snippets.

@tdantas
Last active December 22, 2015 01:48
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 tdantas/6398495 to your computer and use it in GitHub Desktop.
Save tdantas/6398495 to your computer and use it in GitHub Desktop.
YAML Ruby List
#!/usr/bin/env ruby
%w(yaml ap).each { |dep| require dep }
obj = YAML::load(DATA)
ap obj['countries']
puts "-"*20
ap obj['cities']
__END__
countries:
- Brazil
- Portugal
- England
cities: [ Recife, Lisboa, London ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment