Method: FinancialCalculator::Transaction#difference

Defined in:
lib/financial_calculator/transaction.rb

#differenceDecNum

Returns the difference between the original transaction amount and the current amount.

Examples:

t = Transaction.new(500)
t.amount = 750
t.difference #=> DecNum('250')

Returns:

  • (DecNum)

    the difference between the original transaction amount and the current amount



35
36
37
# File 'lib/financial_calculator/transaction.rb', line 35

def difference
  @amount - @original
end