Class: HookR::BasicCallback
- Inherits:
-
BlockCallback
- Object
- Struct
- Callback
- BlockCallback
- HookR::BasicCallback
- Defined in:
- lib/hookr.rb
Overview
A callback which will call a one-arg block with an event object
Instance Attribute Summary
Attributes inherited from BlockCallback
Attributes inherited from Callback
Instance Method Summary collapse
- #call(event) ⇒ Object
-
#initialize(handle, block, index) ⇒ BasicCallback
constructor
A new instance of BasicCallback.
Methods inherited from Callback
Constructor Details
#initialize(handle, block, index) ⇒ BasicCallback
Returns a new instance of BasicCallback.
555 556 557 558 |
# File 'lib/hookr.rb', line 555 def initialize(handle, block, index) check_arity!(block) super end |
Instance Method Details
#call(event) ⇒ Object
560 561 562 |
# File 'lib/hookr.rb', line 560 def call(event) block.call(event) end |