Class: Musa::Extension::DynamicProxy::DynamicProxy
- Includes:
- DynamicProxyModule
- Defined in:
- lib/musa-dsl/core-ext/dynamic-proxy.rb
Overview
Concrete DynamicProxy class ready for instantiation.
Instance Attribute Summary collapse
-
#receiver ⇒ Object?
The object to which methods are delegated.
Instance Method Summary collapse
-
#==(object) ⇒ Boolean
included
from DynamicProxyModule
Delegates equality check to receiver or uses original.
-
#_eql? ⇒ Object
included
from DynamicProxyModule
Preserve original eql? for internal use.
-
#_equalequal ⇒ Object
included
from DynamicProxyModule
Preserve original == for internal use.
-
#_instance_of? ⇒ Object
included
from DynamicProxyModule
Preserve original instance_of? for internal use.
-
#_is_a? ⇒ Object
included
from DynamicProxyModule
Preserve original is_a? for internal use.
-
#_kind_of? ⇒ Object
included
from DynamicProxyModule
Preserve original kind_of? for internal use.
-
#eql?(object) ⇒ Boolean
included
from DynamicProxyModule
Delegates eql? check to receiver or uses original.
-
#has_receiver? ⇒ Boolean
included
from DynamicProxyModule
Checks if the proxy has a receiver assigned.
-
#initialize(receiver = nil) ⇒ DynamicProxy
constructor
Creates a new dynamic proxy.
-
#instance_of?(klass) ⇒ Boolean
included
from DynamicProxyModule
Delegates instance_of? check to receiver or uses original.
-
#is_a?(klass) ⇒ Boolean
included
from DynamicProxyModule
Delegates is_a? check to receiver or uses original.
-
#kind_of?(klass) ⇒ Boolean
included
from DynamicProxyModule
Delegates kind_of? check to receiver or uses original.
-
#method_missing(method_name, *args, **key_args, &block) ⇒ Object
included
from DynamicProxyModule
Forwards unknown methods to the receiver.
-
#respond_to_missing?(method_name, include_private) ⇒ Boolean
included
from DynamicProxyModule
Declares which methods the proxy responds to.
Constructor Details
#initialize(receiver = nil) ⇒ DynamicProxy
Creates a new dynamic proxy.
132 133 134 |
# File 'lib/musa-dsl/core-ext/dynamic-proxy.rb', line 132 def initialize(receiver = nil) @receiver = receiver end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Musa::Extension::DynamicProxy::DynamicProxyModule
Instance Attribute Details
#receiver ⇒ Object?
The object to which methods are delegated.
139 140 141 |
# File 'lib/musa-dsl/core-ext/dynamic-proxy.rb', line 139 def receiver @receiver end |
Instance Method Details
#==(object) ⇒ Boolean Originally defined in module DynamicProxyModule
Delegates equality check to receiver or uses original.
#_eql? ⇒ Object Originally defined in module DynamicProxyModule
Preserve original eql? for internal use
#_equalequal ⇒ Object Originally defined in module DynamicProxyModule
Preserve original == for internal use
#_instance_of? ⇒ Object Originally defined in module DynamicProxyModule
Preserve original instance_of? for internal use
#_is_a? ⇒ Object Originally defined in module DynamicProxyModule
Preserve original is_a? for internal use
#_kind_of? ⇒ Object Originally defined in module DynamicProxyModule
Preserve original kind_of? for internal use
#eql?(object) ⇒ Boolean Originally defined in module DynamicProxyModule
Delegates eql? check to receiver or uses original.
#has_receiver? ⇒ Boolean Originally defined in module DynamicProxyModule
Checks if the proxy has a receiver assigned.
#instance_of?(klass) ⇒ Boolean Originally defined in module DynamicProxyModule
Delegates instance_of? check to receiver or uses original.
#is_a?(klass) ⇒ Boolean Originally defined in module DynamicProxyModule
Delegates is_a? check to receiver or uses original.
#kind_of?(klass) ⇒ Boolean Originally defined in module DynamicProxyModule
Delegates kind_of? check to receiver or uses original.
#respond_to_missing?(method_name, include_private) ⇒ Boolean Originally defined in module DynamicProxyModule
Declares which methods the proxy responds to.