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
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 |
# File 'app/services/report/opportunities_vs_logistics/opportunities_vs_logistics_command.rb', line 16 def execute return unless valid? @result = Report::OpportunitiesVsLogistics::OpportunitiesVsLogistics.results(attributes) end |
#success? ⇒ Boolean
22 23 24 |
# File 'app/services/report/opportunities_vs_logistics/opportunities_vs_logistics_command.rb', line 22 def success? valid? && @result.success? end |