Skip to content

Instantly share code, notes, and snippets.

@albedoa
Last active August 29, 2015 14:05
Show Gist options
  • Save albedoa/36a1a56bbacb84174eaa to your computer and use it in GitHub Desktop.
Save albedoa/36a1a56bbacb84174eaa to your computer and use it in GitHub Desktop.
I have a Hash `entries` with values of Struct `Entry`. Each Entry has a hash with values of Struct `Successors`. Is this the simplest way to loop over the successors?
entries.each do |entry, entry_val|
entry_val.successors.each do |successor, successor_val|
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment