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.



540
541
542
543
# File 'lib/hookr.rb', line 540

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

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



538
539
540
# File 'lib/hookr.rb', line 538

def block
  @block
end