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
# 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)


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

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