Skip to content

Instantly share code, notes, and snippets.

@letsbreelhere
Created February 29, 2012 05:43
Show Gist options
  • Save letsbreelhere/1938271 to your computer and use it in GitHub Desktop.
Save letsbreelhere/1938271 to your computer and use it in GitHub Desktop.
Functional to_hash
def to_hash
@reports.inject({}) do |report_hash, report|
report_hash.merge report.to_hash
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment