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.
577 578 579 580 |
# File 'lib/hookr.rb', line 577 def initialize(handle, block, index) check_arity!(block) super end |
Instance Method Details
#call(event) ⇒ Object
582 583 584 |
# File 'lib/hookr.rb', line 582 def call(event) block.call(event) end |