Module: DoubleEntry::Reporting
- Extended by:
- Reporting
- Includes:
- Configurable
- Included in:
- Reporting
- Defined in:
- lib/double_entry/reporting.rb,
lib/double_entry/reporting/version.rb,
lib/double_entry/reporting/aggregate.rb,
lib/double_entry/reporting/day_range.rb,
lib/double_entry/reporting/hour_range.rb,
lib/double_entry/reporting/time_range.rb,
lib/double_entry/reporting/week_range.rb,
lib/double_entry/reporting/year_range.rb,
lib/double_entry/reporting/month_range.rb,
lib/double_entry/reporting/line_aggregate.rb,
lib/double_entry/reporting/aggregate_array.rb,
lib/double_entry/reporting/time_range_array.rb,
lib/double_entry/reporting/line_metadata_filter.rb,
lib/double_entry/reporting/line_aggregate_filter.rb,
lib/generators/double_entry/reporting/install/install_generator.rb
Defined Under Namespace
Modules: Generators Classes: Aggregate, AggregateArray, AggregateFunctionNotSupported, Configuration, DayRange, HourRange, LineAggregate, LineAggregateFilter, LineMetadataFilter, MonthRange, TimeRange, TimeRangeArray, WeekRange, YearRange
Constant Summary collapse
- VERSION =
'0.1.0'.freeze
Instance Method Summary collapse
-
#aggregate(function:, account:, code:, range:, partner_account: nil, filter: nil) ⇒ Money, Integer
Perform an aggregate calculation on a set of transfers for an account.
-
#aggregate_array(function:, account:, code:, partner_account: nil, filter: nil, range_type: nil, start: nil, finish: nil) ⇒ Array<Money, Integer>
Perform an aggregate calculation on a set of transfers for an account and return the results in an array partitioned by a time range type.
Instance Method Details
#aggregate(function:, account:, code:, range:, partner_account: nil, filter: nil) ⇒ Money, Integer
Perform an aggregate calculation on a set of transfers for an account.
The transfers included in the calculation can be limited by time range and provided custom filters.
85 86 87 88 |
# File 'lib/double_entry/reporting.rb', line 85 def aggregate(function:, account:, code:, range:, partner_account: nil, filter: nil) Aggregate.formatted_amount(function: function, account: account, code: code, range: range, partner_account: partner_account, filter: filter) end |
#aggregate_array(function:, account:, code:, partner_account: nil, filter: nil, range_type: nil, start: nil, finish: nil) ⇒ Array<Money, Integer>
Perform an aggregate calculation on a set of transfers for an account and return the results in an array partitioned by a time range type.
The transfers included in the calculation can be limited by a time range and provided custom filters.
139 140 141 142 143 |
# File 'lib/double_entry/reporting.rb', line 139 def aggregate_array(function:, account:, code:, partner_account: nil, filter: nil, range_type: nil, start: nil, finish: nil) AggregateArray.new(function: function, account: account, code: code, partner_account: partner_account, filter: filter, range_type: range_type, start: start, finish: finish) end |