Skip to content

Instantly share code, notes, and snippets.

@bluSch
Created May 28, 2013 17:43
Show Gist options
  • Save bluSch/5664606 to your computer and use it in GitHub Desktop.
Save bluSch/5664606 to your computer and use it in GitHub Desktop.
[28] pry(main)> o = {:opsworks => { :layers => { :php => { :instances => { :leb => {:private_ip => "1.1.1.1"}}}}}}
=> {:opsworks=>{:layers=>{:php=>{:instances=>{:leb=>{:private_ip=>"1.1.1.1"}}}}}}
[29] pry(main)> o[:opsworks][:layers].each do |layer|
[29] pry(main)* layer[:instances].each do |instance|
[29] pry(main)* puts instance[:private_ip]
[29] pry(main)* end
[29] pry(main)* end
TypeError: can't convert Symbol into Integer
from (pry):64:in `[]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment