Skip to content

Instantly share code, notes, and snippets.

@imageaid
Created December 26, 2014 14:17
Show Gist options
  • Save imageaid/db072556a5512696f710 to your computer and use it in GitHub Desktop.
Save imageaid/db072556a5512696f710 to your computer and use it in GitHub Desktop.
Using a Hash a Multimap
data = Hash.new { |hash, key| hash[key] = [] }
data[:description] = "Test"
data[:expression] = "catch_all()"
data[:action] << "stop()"
data[:action] << "store()"
@imageaid
Copy link
Author

Pulled from HashNuke/mailgun#32 and user @dideler (https://github.com/dideler) so that I have it more readily available should I need it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment