Class: LitleOnline::DefaultLitleListener
- Inherits:
-
Object
- Object
- LitleOnline::DefaultLitleListener
- Defined in:
- lib/LitleListeners.rb
Overview
This listener will run the provided closure over every response hash This is the base class for all listeners applied to transaction responses
Direct Known Subclasses
AuthReversalListener, AuthorizationListener, CaptureGivenAuthListener, CaptureListener, CreditListener, EcheckCreditListener, EcheckRedepositListener, EcheckSaleListener, EcheckVerificationListener, ForceCaptureListener, RegisterTokenListener, SaleListener
Instance Method Summary collapse
- #apply(duck) ⇒ Object
-
#initialize(&action) ⇒ DefaultLitleListener
constructor
A new instance of DefaultLitleListener.
Constructor Details
#initialize(&action) ⇒ DefaultLitleListener
Returns a new instance of DefaultLitleListener.
35 36 37 |
# File 'lib/LitleListeners.rb', line 35 def initialize(&action) @action = action end |
Instance Method Details
#apply(duck) ⇒ Object
39 40 41 42 |
# File 'lib/LitleListeners.rb', line 39 def apply(duck) # apply the proc uniformly across all response types @action.call(duck) end |