Class: Dscf::Banking::BaseTransactionService

Inherits:
Object
  • Object
show all
Defined in:
app/services/dscf/banking/base_transaction_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBaseTransactionService

Returns a new instance of BaseTransactionService.



5
6
7
# File 'app/services/dscf/banking/base_transaction_service.rb', line 5

def initialize
  @errors = []
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'app/services/dscf/banking/base_transaction_service.rb', line 3

def errors
  @errors
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/services/dscf/banking/base_transaction_service.rb', line 13

def failure?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/services/dscf/banking/base_transaction_service.rb', line 9

def success?
  errors.empty?
end