Skip to content

Instantly share code, notes, and snippets.

@jordanorelli
Created May 12, 2014 21:27
Show Gist options
  • Save jordanorelli/37e1a103da2e9b45d0d6 to your computer and use it in GitHub Desktop.
Save jordanorelli/37e1a103da2e9b45d0d6 to your computer and use it in GitHub Desktop.
def foo(arg_one, arg_two = 5)
puts "arg_one: #{arg_one} arg_two: #{arg_two}"
end
foo 1, 2
foo 1
@jordanorelli
Copy link
Author

in this case, arg_two is optional. If you only supply one argument, arg_two defaults to 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment