Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created February 3, 2014 22:10
Show Gist options
  • Save havenwood/169e5bbd9174fe04479a to your computer and use it in GitHub Desktop.
Save havenwood/169e5bbd9174fe04479a to your computer and use it in GitHub Desktop.
def calculate(number, *other_numbers, **options)
if options[:subtract]
subtract(number, other_numbers, options)
elsif options[:add]
add(number, other_numbers, options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment