Module: SubRinterceptorExample
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
#rinter_after, #rinter_before
included, #rinter_after, #rinter_around, #rinter_before, #rinter_skip?
Class Method Details
.rinter_after_include_class(base) ⇒ Object
29
30
31
|
# File 'lib/rinterceptor_example.rb', line 29
def self.rinter_after_include_class(base)
p "after_include_class in SubRinterceptorExample"
end
|
.rinter_before_include_class(base) ⇒ Object
24
25
26
27
28
|
# File 'lib/rinterceptor_example.rb', line 24
def self.rinter_before_include_class(base)
p "before_include_class in SubRinterceptorExample"
base.instance_variable_set(:@include_i_methods, {nil => [/^i2_/, /^i3_/], :handler_it => /^i1_/})
end
|
Instance Method Details
#rinter_handler_it_around(invocation) ⇒ Object
32
33
34
35
36
37
|
# File 'lib/rinterceptor_example.rb', line 32
def rinter_handler_it_around(invocation)
p "instance handler_it around begin -- method: #{invocation.method}, args: #{invocation.args} in SubRinterceptorExample"
result = invocation.invoke("inter", "ddddd")
p "instance handler_it around end -- method: #{invocation.method}, args: #{invocation.args} in SubRinterceptorExample"
result
end
|