Module: Peeek::Readily
- Defined in:
- lib/peeek.rb
Instance Method Summary collapse
-
#peeek(*method_specs) {|call| ... } ⇒ Object
Register a hook to methods of self to the current Peeek object.
-
#peeek_lazily(*method_specs) {|call| ... } ⇒ Object
Register a hook to methods of an object to the current Peeek object.
Instance Method Details
#peeek(*method_specs) {|call| ... } ⇒ Object
Register a hook to methods of self to the current Peeek object.
144 145 146 |
# File 'lib/peeek.rb', line 144 def peeek(*method_specs, &process) Peeek.current.hook(self, *method_specs, &process) end |
#peeek_lazily(*method_specs) {|call| ... } ⇒ Object
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.
159 160 161 |
# File 'lib/peeek.rb', line 159 def peeek_lazily(*method_specs, &process) Lazy.new(self).peeek(*method_specs, &process) end |