Created
April 29, 2012 23:32
-
-
Save sllvn/2554014 to your computer and use it in GitHub Desktop.
Create a hash with keys set in array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keys = %w[event event_id event_type name description date] | |
Hash[*keys.map { |v| [v.to_sym, nil] }.flatten] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment