module Peeek::Readily
Public Instance Methods
peeek(*method_specs, &process)
click to toggle source
Register a hook to methods of self to the current Peeek
object.
@param [Array<String>, Array<Symbol>] method_specs method specifiers of
the object. see also examples of {Peeek::Hook.create}
@yield [call] process a call to the methods. give optionally @yieldparam [Peeek::Call] call a call to the methods
@see Peeek#hook
@see Peeek::Readily#peeek_lazily
# File lib/peeek.rb, line 144 def peeek(*method_specs, &process) Peeek.current.hook(self, *method_specs, &process) end
peeek_lazily(*method_specs, &process)
click to toggle source
Register a hook to methods of an object to the current Peeek
object. The object is that is pointed by self, work well even if the object isn’t defined when called this method.
@param [Array<String, Array<Symbol>] method_specs method specifiers of
the object. see also examples of {Peeek::Hook.create}
@yield [call] process a call to the methods. give optionally @yieldparam [Peeek::Call] call a call to the methods
@see Peeek#hook
@see Peeek::Readily#peeek
# File lib/peeek.rb, line 159 def peeek_lazily(*method_specs, &process) Lazy.new(self).peeek(*method_specs, &process) end