Class: Keepr::Journal
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Keepr::Journal
- Defined in:
- lib/keepr/journal.rb
Instance Method Summary collapse
Instance Method Details
#amount ⇒ Object
26 27 28 |
# File 'lib/keepr/journal.rb', line 26 def amount debit_postings.sum(&:amount) end |
#credit_postings ⇒ Object
18 19 20 |
# File 'lib/keepr/journal.rb', line 18 def credit_postings existing_postings.select(&:credit?) end |
#debit_postings ⇒ Object
22 23 24 |
# File 'lib/keepr/journal.rb', line 22 def debit_postings existing_postings.select(&:debit?) end |