Exception: SpookAndPay::Transaction::InvalidActionError
- Inherits:
-
StandardError
- Object
- StandardError
- SpookAndPay::Transaction::InvalidActionError
- Defined in:
- lib/spook_and_pay/transaction.rb
Overview
An error thrown when attempting to perform an action that is not allowed given a transaction’s status.
Instance Method Summary collapse
-
#initialize(id, action, status) ⇒ InvalidActionError
constructor
A new instance of InvalidActionError.
-
#to_s ⇒ Object
Human readable message.
Constructor Details
#initialize(id, action, status) ⇒ InvalidActionError
Returns a new instance of InvalidActionError.
26 27 28 29 30 |
# File 'lib/spook_and_pay/transaction.rb', line 26 def initialize(id, action, status) @id = id @action = action @status = status end |
Instance Method Details
#to_s ⇒ Object
Human readable message.
35 36 37 |
# File 'lib/spook_and_pay/transaction.rb', line 35 def to_s "Cannot perform the action '#{@action}' for transaction '#{@id}' while in status '#{@status}'" end |