Skip to content

Instantly share code, notes, and snippets.

@GeoffTidey
Forked from caius/default_param_hack.rb
Created December 29, 2011 00:42
Show Gist options
  • Save GeoffTidey/1530761 to your computer and use it in GitHub Desktop.
Save GeoffTidey/1530761 to your computer and use it in GitHub Desktop.
def output name=((default=true); "caius")
puts "name: #{name.inspect}"
puts "default: #{default.inspect}"
end
output
# >> name: "caius"
# >> default: true
output "avdi"
# >> name: "avdi"
# >> default: nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment