Class: Report::BookOfBusiness::BookOfBusinessCommand
- Inherits:
-
Report::BaseCommand
- Object
- Report::BaseCommand
- Report::BookOfBusiness::BookOfBusinessCommand
- Defined in:
- app/services/report/book_of_business/book_of_business_command.rb
Overview
Command pattern to encapsulate parameters necessary to run a presence report
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.company_options ⇒ Object
13 14 15 |
# File 'app/services/report/book_of_business/book_of_business_command.rb', line 13 def self. @company_options ||= Company. end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 |
# File 'app/services/report/book_of_business/book_of_business_command.rb', line 17 def execute return unless valid? @result = Report::BookOfBusiness::BookOfBusiness.result_report(attributes) end |
#success? ⇒ Boolean
22 23 24 |
# File 'app/services/report/book_of_business/book_of_business_command.rb', line 22 def success? valid? && @result.success? end |