Class: Wallet

Inherits:
Array
  • Object
show all
Defined in:
lib/money/money.rb

Overview

Represent a financial array. Investment/Time/Installments…TODO…

Instance Method Summary collapse

Instance Method Details

#sumObject



342
343
344
# File 'lib/money/money.rb', line 342

def sum
  Money.new(inject(0){ |sum,m| sum + m.cents })
end

#to_sObject



338
339
340
# File 'lib/money/money.rb', line 338

def to_s
  map &:to_s
end