Class: Dscf::Banking::BaseTransactionService
- Inherits:
-
Object
- Object
- Dscf::Banking::BaseTransactionService
- Defined in:
- app/services/dscf/banking/base_transaction_service.rb
Direct Known Subclasses
DepositService, TransferService, VoucherService, WithdrawalService
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize ⇒ BaseTransactionService
constructor
A new instance of BaseTransactionService.
- #success? ⇒ Boolean
Constructor Details
#initialize ⇒ BaseTransactionService
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
#errors ⇒ Object (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
13 14 15 |
# File 'app/services/dscf/banking/base_transaction_service.rb', line 13 def failure? !success? end |
#success? ⇒ Boolean
9 10 11 |
# File 'app/services/dscf/banking/base_transaction_service.rb', line 9 def success? errors.empty? end |