Class: LazyMethods::Proxy
- Inherits:
-
Object
- Object
- LazyMethods::Proxy
- Defined in:
- lib/lazy_methods.rb
Overview
The proxy object does all the heavy lifting.
Direct Known Subclasses
Constant Summary collapse
- PROTECTED_METHODS =
These methods we don’t want to override. All other existing methods will be redefined.
%w(initialize method_missing __proxy_result__ __proxy_loaded__ __send__ __id__ object_id)
Instance Method Summary collapse
-
#method_missing(method, *args, &block) ⇒ Object
All missing methods are proxied to the original result object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
All missing methods are proxied to the original result object.
90 91 92 |
# File 'lib/lazy_methods.rb', line 90 def method_missing(method, *args, &block) __proxy_result__.send(method, *args, &block) end |