Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/Users/kn/.rvm/rubies/ruby-1.9.3-preview1/bin/ruby
- # hest.yml:
- # hest:
- # username: ko
- # password: gris
- # ko:
- # username: ko
- # password: tis
- # numbers: [1,2]
- require 'yaml'
- thing = YAML.load_file('hest.yml')
- #puts thing.inspect
- thing.each_key do |k|
- puts thing[k]["username"]
- thing[k]['numbers'].each do |v|
- puts "number: #{v}"
- end unless thing[k]['numbers'].nil?
- end
Add Comment
Please, Sign In to add comment