Last active
December 25, 2015 12:49
-
-
Save bricker/6979707 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
puts RUBY_VERSION | |
# "2.0.0" | |
def parameters(params={}, content_type: "text/html") | |
puts params | |
puts content_type | |
end | |
parameters({ query: "Ruby" }) | |
# ArgumentError: unknown keyword: query | |
parameters({ query: "Ruby" }, { content_type: "application/json" }) | |
# {:query=>"Ruby"} | |
# application/json | |
parameters({ query: "Ruby" }, {}) | |
# {:query=>"Ruby"} | |
# text/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment