Skip to content

Instantly share code, notes, and snippets.

@achambers
Created July 27, 2011 17:48
Show Gist options
  • Select an option

  • Save achambers/1109964 to your computer and use it in GitHub Desktop.

Select an option

Save achambers/1109964 to your computer and use it in GitHub Desktop.
insufficient_funds_ruby
def withdraw account_number, withdrawal_amount do
account = Account.find account_number
unless account.sufficient_funds? withdrawal_amount do
raise "Insufficient funds"
end
#...more code...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment