Class: HookR::BasicCallback

Inherits:
BlockCallback show all
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

#block

Attributes inherited from Callback

#handle, #index

Instance Method Summary collapse

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