Class: Report::TechCallsReport::TechCallsReportCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
app/services/report/tech_calls_report/tech_calls_report_command.rb

Overview

Command pattern to encapsulate parameters necessary to run a presence report

Instance Method Summary collapse

Instance Method Details

#executeObject



9
10
11
12
13
# File 'app/services/report/tech_calls_report/tech_calls_report_command.rb', line 9

def execute
  return unless valid?

  @result = Report::TechCallsReport::TechCallsReport.total_report(attributes)
end

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/services/report/tech_calls_report/tech_calls_report_command.rb', line 15

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