class Aloe::Reports::AccountHistory

Attributes

account[R]

Public Class Methods

new(account) click to toggle source
# File lib/aloe/reports/account_history.rb, line 7
def initialize(account)
  @account = account
end

Public Instance Methods

body() click to toggle source
# File lib/aloe/reports/account_history.rb, line 15
def body
  account.entries.map do |e|
    tr = e.transaction
    [tr.category,
      tr.credit_entry.account.to_s,
      tr.debit_entry.account.to_s,
      e.amount.format,
      e.created_at.to_s]
  end
end
header() click to toggle source
# File lib/aloe/reports/account_history.rb, line 11
def header
  ['Transaction', 'Credit', 'Debit', 'Amount', 'Time']
end