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