Class: DoubleEntry::Reporting::AggregateArray

Inherits:
Array
  • Object
show all
Defined in:
lib/double_entry/reporting/aggregate_array.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function:, account:, code:, partner_account: nil, filter: nil, range_type: nil, start: nil, finish: nil) ⇒ AggregateArray

Returns a new instance of AggregateArray.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/double_entry/reporting/aggregate_array.rb', line 14

def initialize(function:, account:, code:, partner_account: nil, filter: nil, range_type: nil, start: nil, finish: nil)
  @function        = function.to_s
  @account         = 
  @code            = code
  @partner_account = 
  @filter          = filter
  @range_type      = range_type
  @start           = start
  @finish          = finish
  @currency        = DoubleEntry::Account.currency()

  retrieve_aggregates
  fill_in_missing_aggregates
  populate_self
end

Instance Attribute Details

#accountObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def 
  @account
end

#codeObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def code
  @code
end

#currencyObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def currency
  @currency
end

#filterObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def filter
  @filter
end

#finishObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def finish
  @finish
end

#functionObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def function
  @function
end

#partner_accountObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def 
  @partner_account
end

#range_typeObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def range_type
  @range_type
end

#startObject (readonly)

An AggregateArray is awesome It is useful for making reports It is basically an array of aggregate results, representing a column of data in a report.

For example, you could request all sales broken down by month and it would return an array of values



12
13
14
# File 'lib/double_entry/reporting/aggregate_array.rb', line 12

def start
  @start
end