Class: HookR::BlockCallback

Inherits:
Callback
  • Object
show all
Defined in:
lib/hookr.rb

Overview

A base class for callbacks which execute a block

Direct Known Subclasses

BasicCallback, ExternalCallback, InternalCallback

Instance Attribute Summary collapse

Attributes inherited from Callback

#handle, #index

Instance Method Summary collapse

Methods inherited from Callback

#<=>, #call

Constructor Details

#initialize(handle, block, index) ⇒ BlockCallback

Returns a new instance of BlockCallback.



562
563
564
565
# File 'lib/hookr.rb', line 562

def initialize(handle, block, index)
  @block = block
  super(handle, index)
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



560
561
562
# File 'lib/hookr.rb', line 560

def block
  @block
end