Class: Report::TechCallsReport::TechCallsReportCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::TechCallsReport::TechCallsReportCommand
- Defined in:
- app/services/report/tech_calls_report/tech_calls_report_command.rb
Overview
Command pattern to encapsulate parameters necessary to run a presence report
Instance Method Summary collapse
-
#execute ⇒ Object
Run the report with the given filters and store the result.
-
#success? ⇒ Boolean
Whether the command validated and ran successfully.
Instance Method Details
#execute ⇒ Object
Run the report with the given filters and store the result.
11 12 13 14 15 |
# File 'app/services/report/tech_calls_report/tech_calls_report_command.rb', line 11 def execute return unless valid? @result = Report::TechCallsReport::TechCallsReport.total_report(attributes) end |
#success? ⇒ Boolean
Whether the command validated and ran successfully.
19 20 21 |
# File 'app/services/report/tech_calls_report/tech_calls_report_command.rb', line 19 def success? valid? && @result.success? end |