Created
September 11, 2011 22:11
-
-
Save softwaregravy/1210199 to your computer and use it in GitHub Desktop.
Options of Nil and Fasle
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
# The way I basically always check | |
def my_method(options = {}) | |
if options[:key] | |
# do something using the option here | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment