Class: TogglBillable::Formatter::Summary
- Defined in:
- lib/toggl_billable/formatter/summary.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#billable_items ⇒ Object
TODO: make this working also for different grouping than default TODO: rounding parameter TODO: implement custom formatting TODO: projects without names.
Methods inherited from Base
Constructor Details
This class inherits a constructor from TogglBillable::Formatter::Base
Instance Method Details
#billable_items ⇒ Object
TODO: make this working also for different grouping than default TODO: rounding parameter TODO: implement custom formatting TODO: projects without names
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/toggl_billable/formatter/summary.rb', line 9 def billable_items data.group_by { |d| d['title']['client'] }.each do |group_name, group_data| key = group_name || @no_client_key billable[key] = [] unless billable[key] group_data.group_by { |d| d['title']['project'] }.each do |subgroup_name, subgroup_data| process_project(subgroup_data.first) end end billable end |