Class: Report::CampaignsReport::CampaignsReportCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::CampaignsReport::CampaignsReportCommand
- Defined in:
- app/services/report/campaigns_report/campaigns_report_command.rb
Overview
Service object: campaigns report command.
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.
12 13 14 15 16 |
# File 'app/services/report/campaigns_report/campaigns_report_command.rb', line 12 def execute return unless valid? @result = Report::CampaignsReport::CampaignsReport.result(attributes) end |
#success? ⇒ Boolean
Whether the command validated and ran successfully.
20 21 22 |
# File 'app/services/report/campaigns_report/campaigns_report_command.rb', line 20 def success? valid? && @result.success? end |