Class: Report::RmasReport::RmasReportCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
app/services/report/rmas_report/rmas_report_command.rb

Overview

Service object: rmas report command.

Instance Method Summary collapse

Instance Method Details

#executeObject

Run the report with the given filters and store the result.

Returns:

  • (Object)


14
15
16
17
18
# File 'app/services/report/rmas_report/rmas_report_command.rb', line 14

def execute
  return unless valid?

  @result = Report::RmasReport::RmasReport.result(attributes)
end

#success?Boolean

Whether the command validated and ran successfully.

Returns:

  • (Boolean)


22
23
24
# File 'app/services/report/rmas_report/rmas_report_command.rb', line 22

def success?
  valid? && @result.success?
end