Sha256: 37aeb90f7d7ee1cf3e0985e3f438d6340e9234529e21b42b71276ae28e4ff887
Contents?: true
Size: 627 Bytes
Versions: 17
Compression:
Stored size: 627 Bytes
Contents
module ActsAsAccount class Transfer attr_accessor :amount, :reference, :from, :to, :journal, :valuta def initialize(posting_1, posting_2) @amount, @reference = posting_2.amount, posting_2.reference @from, @to = posting_1.account, posting_2.account @journal = posting_1.journal @valuta = posting_1.valuta end def referencing_a?(klasse) reference.kind_of?(klasse) end def reverse(valuta = Time.now, reference = @reference, amount = @amount) @journal.transfer( amount, @to, @from, reference, valuta) end end end
Version data entries
17 entries across 17 versions & 1 rubygems