Created
February 9, 2012 21:53
-
-
Save agross/1783598 to your computer and use it in GitHub Desktop.
Trying to initialize a hash with a value from a another, should fail if the other hash doesn't contain the key
This file contains hidden or 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
hsh = { :key => other_hsh[:foo] or raise "No value for 'foo'!" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Possible application in Haml: