Skip to content

Instantly share code, notes, and snippets.

Created March 24, 2015 03:55
Show Gist options
  • Save anonymous/4e4f623ba96c6bd3fa5c to your computer and use it in GitHub Desktop.
Save anonymous/4e4f623ba96c6bd3fa5c to your computer and use it in GitHub Desktop.
hash = Hash.new
hash["ST"] = {:cur => '12', :now => '4', :size => '1000', :queue => ["12345", "6784321"]}
puts hash
hash.each do |k, v|
puts "#{k}:#{v}"
v.each { |a, b|
puts "HASH #{a}:#{b}"
if a.to_s.eql? 'queue'
arr = [*Array(b)]
puts "Q#{arr.length}"
puts "#{arr}"
# same thing as below
arr.each {|d|
puts "D#{d}"
}
b.each { |c|
puts “Deep Value #{c}"
}
end
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment