Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@bricker /keys.rb
Last active Dec 25, 2015

# "2.0.0"
def parameters(params={}, content_type: "text/html")
puts params
puts content_type
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
Something went wrong with that request. Please try again.