Created
October 7, 2010 22:00
-
-
Save heycarsten/615985 to your computer and use it in GitHub Desktop.
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
# I had no idea that you could do this: | |
def attribute(name, type = Ohm::Types::String, klass = Ohm::Types[type]) | |
# If no 3rd argument is provided then it uses the second argument to key | |
# the default value. Not super obvious, but now that I know about it, I | |
# think it's kinda cool :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment