Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Line 15
- def total
- pennies + nickels + dimes + quarters + ones + fives + tens + twenties + fifties + hundreds
- end
- ### Line 19
- def discrepancy?
- total != amount.abs
- end
- ### Line 32
- protected
- def must_not_have_discrepancy
- errors.add("amount", "does not match totals given.") if discrepancy?
- end
Add Comment
Please, Sign In to add comment