Class: Kinda::Hookable::HookedMethod

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, name) ⇒ HookedMethod

Returns a new instance of HookedMethod.



131
132
133
134
# File 'lib/hookable.rb', line 131

def initialize(klass, name)
  @klass = klass
  @name = name
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass.



128
129
130
# File 'lib/hookable.rb', line 128

def klass
  @klass
end

#method_patchedObject

Returns the value of attribute method_patched.



129
130
131
# File 'lib/hookable.rb', line 129

def method_patched
  @method_patched
end

#nameObject (readonly)

Returns the value of attribute name.



128
129
130
# File 'lib/hookable.rb', line 128

def name
  @name
end

Instance Method Details

#hooksObject



136
137
138
# File 'lib/hookable.rb', line 136

def hooks
  @hooks ||= Hash.new { |hash, kind| hash[kind] = [] }
end