Class: TransparentProxy
- Inherits:
-
Object
show all
- Defined in:
- lib/transparent_proxy.rb
Constant Summary
collapse
- VERSION =
'0.0.5'
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
44
45
46
|
# File 'lib/transparent_proxy.rb', line 44
def method_missing(method, *args, &block)
__getobj__.send(method, *args, &block)
end
|
Instance Method Details
#inspect ⇒ Object
14
15
16
|
# File 'lib/transparent_proxy.rb', line 14
def inspect
__getobj__.inspect
end
|
#methods(*args) ⇒ Object
22
23
24
|
# File 'lib/transparent_proxy.rb', line 22
def methods(*args)
proxy_methods(*args) | __getobj__.methods(*args)
end
|
#proxy? ⇒ Boolean
30
31
32
|
# File 'lib/transparent_proxy.rb', line 30
def proxy?
true
end
|
#proxy_inspect ⇒ Object
18
19
20
|
# File 'lib/transparent_proxy.rb', line 18
def proxy_inspect
"#<#{proxy_class} @object=#{inspect}>"
end
|
#respond_to?(*args) ⇒ Boolean
26
27
28
|
# File 'lib/transparent_proxy.rb', line 26
def respond_to?(*args)
proxy_respond_to?(*args) || __getobj__.respond_to?(*args)
end
|