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
28 29 30 |
# File 'lib/keepr/journal.rb', line 28 def amount debit_postings.sum(&:amount) end |
#credit_postings ⇒ Object
20 21 22 |
# File 'lib/keepr/journal.rb', line 20 def credit_postings existing_postings.select(&:credit?) end |
#debit_postings ⇒ Object
24 25 26 |
# File 'lib/keepr/journal.rb', line 24 def debit_postings existing_postings.select(&:debit?) end |