Class: Report::AccountingRecords::AccountingRecordsCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
app/services/report/accounting_records/accounting_records_command.rb

Overview

Command pattern to encapsulate parameters necessary to run a presence report

Instance Method Summary collapse

Instance Method Details

#executeObject



13
14
15
16
# File 'app/services/report/accounting_records/accounting_records_command.rb', line 13

def execute
  return unless valid?
  @result = Report::AccountingRecords::AccountingRecords.result_report(attributes)
end

#success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/services/report/accounting_records/accounting_records_command.rb', line 18

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