Class: Debit
Instance Method Summary collapse
Methods inherited from Entry
Instance Method Details
#balanced? ⇒ Boolean
11 12 13 |
# File 'app/models/debit.rb', line 11 def balanced? !credit.nil? and (credit.amount + amount == 0) end |
#sign_convention ⇒ Object
7 8 9 |
# File 'app/models/debit.rb', line 7 def sign_convention errors.add(:base, "Debit must be non-positive") unless amount <= 0 end |