Class: Report::TechProductivity::TechProductivityCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
app/services/report/tech_productivity/tech_productivity_command.rb

Overview

Service object: tech productivity command.

Instance Method Summary collapse

Instance Method Details

#executeObject

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

Returns:

  • (Object)


13
14
15
16
17
# File 'app/services/report/tech_productivity/tech_productivity_command.rb', line 13

def execute
  return unless valid?

  @result = Report::TechProductivity::TechProductivity.result_report(attributes)
end

#success?Boolean

Whether the command validated and ran successfully.

Returns:

  • (Boolean)


21
22
23
# File 'app/services/report/tech_productivity/tech_productivity_command.rb', line 21

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