Class: Report::ProfileDiscount::ProfileDiscountCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::ProfileDiscount::ProfileDiscountCommand
- Defined in:
- app/services/report/profile_discount/profile_discount_command.rb
Overview
Command pattern to encapsulate parameters necessary to run a presence report
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
6 7 8 9 |
# File 'app/services/report/profile_discount/profile_discount_command.rb', line 6 def execute return unless valid? @result = Report::ProfileDiscount::ProfileDiscount.result_report(attributes) end |
#success? ⇒ Boolean
11 12 13 |
# File 'app/services/report/profile_discount/profile_discount_command.rb', line 11 def success? valid? && @result.success? end |