Class: Treasurer::Reporter::SubAccount
- Defined in:
- lib/treasurer/accounts.rb
Instance Attribute Summary
Attributes inherited from Account
#average, #currency, #external, #name, #original_currency, #projection, #runs
Instance Method Summary collapse
-
#initialize(name, reporter, runner, runs, external, options = {}) ⇒ SubAccount
constructor
A new instance of SubAccount.
Methods inherited from Account
#available, #balance, #balance_graph_string, #cache, #currency_label, #deposited, #discretionary, #generate_report_account, #has_balance?, #info, #linked_projected_account_info, #money_in_sign, #name_c, #name_c_file, #non_discretionary_projected_balance, #opening_balance, #opening_date, #projected_balance, #red_line, #report_account, #report_start, #should_report?, #sub_accounts, #summary_line, #summary_table, #type, #withdrawn, #write_balance_graph
Constructor Details
#initialize(name, reporter, runner, runs, external, options = {}) ⇒ SubAccount
Returns a new instance of SubAccount.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/treasurer/accounts.rb', line 5 def initialize(name, reporter, runner, runs, external, ={}) @name = name @reporter = reporter @runner = runner #@projected_accounts_info =Hash[projected_accounts_info.find_all{|k,v| v[:account] == name}] @external = external @runs = runs.find_all{|r| r.sub_account == name} info[:external] = external if info #ep ['sub_accounts333', name, @runs.size, runs.size] end |