Class: Report::CostCenter::CostCenterCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::CostCenter::CostCenterCommand
- Defined in:
- app/services/report/cost_center/cost_center_command.rb
Overview
Command pattern to encapsulate parameters necessary to run a presence report
Class Method Summary collapse
-
.years ⇒ Array<Integer>
Years.
Instance Method Summary collapse
-
#execute ⇒ Object
Run the report with the given filters and store the result.
Class Method Details
.years ⇒ Array<Integer>
Years.
32 33 34 |
# File 'app/services/report/cost_center/cost_center_command.rb', line 32 def self.years (2012..Date.current.year).to_a end |
Instance Method Details
#execute ⇒ Object
Run the report with the given filters and store the result.
10 11 12 13 14 |
# File 'app/services/report/cost_center/cost_center_command.rb', line 10 def execute return unless valid? @result = Report::CostCenter::CostCenter.result_report(attributes) end |