Skip to content

Instantly share code, notes, and snippets.

@letsbreelhere
Created February 29, 2012 05:40
Show Gist options
  • Save letsbreelhere/1938258 to your computer and use it in GitHub Desktop.
Save letsbreelhere/1938258 to your computer and use it in GitHub Desktop.
Imperative to_hash
def to_hash
hash = {}
@reports.each do |report|
hash.merge! report.to_hash
end
hash
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment