Top Level Namespace
Defined Under Namespace
Class Method Summary collapse
- .advise(object, &block) ⇒ Object
- .after(method, &block) ⇒ Object
- .before(method, &block) ⇒ Object
- .instead(method, &block) ⇒ Object
Class Method Details
.advise(object, &block) ⇒ Object
6 7 8 9 |
# File 'lib/adviser.rb', line 6 def advise(object, &block) @object = object Proc.new(&block).call end |
.after(method, &block) ⇒ Object
19 20 21 |
# File 'lib/adviser.rb', line 19 def after(method, &block) @object.__create_after(method, Proc.new(&block)) end |
.before(method, &block) ⇒ Object
15 16 17 |
# File 'lib/adviser.rb', line 15 def before(method, &block) @object.__create_before(method, Proc.new(&block)) end |
.instead(method, &block) ⇒ Object
11 12 13 |
# File 'lib/adviser.rb', line 11 def instead(method, &block) @object.__create_instead(method, Proc.new(&block)) end |