Class: Report::OpportunitiesVsLogistics::OpportunitiesVsLogisticsCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::OpportunitiesVsLogistics::OpportunitiesVsLogisticsCommand
- Defined in:
- app/services/report/opportunities_vs_logistics/opportunities_vs_logistics_command.rb
Overview
Service object: opportunities vs logistics command.
Constant Summary collapse
- PRODUCT_LINE_OPTIONS =
Available product line options.
[["Floor Heating", 1], ["Snow Melting", 2], ["Roof & Gutter Deicing", 3], ["Pipe Freeze Protection", 4]].freeze
- DISPLAY_OPTIONS =
Available display options.
[%w[Weekly week], %w[Monthly month], %w[Quarterly quarter]].freeze
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.
18 19 20 21 22 |
# File 'app/services/report/opportunities_vs_logistics/opportunities_vs_logistics_command.rb', line 18 def execute return unless valid? @result = Report::OpportunitiesVsLogistics::OpportunitiesVsLogistics.results(attributes) end |
#success? ⇒ Boolean
Whether the command validated and ran successfully.
26 27 28 |
# File 'app/services/report/opportunities_vs_logistics/opportunities_vs_logistics_command.rb', line 26 def success? valid? && @result.success? end |