Module: ProxyMethod

Defined in:
lib/proxy_method.rb,
lib/proxy_method/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
'1.2.9'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



273
274
275
# File 'lib/proxy_method.rb', line 273

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#proxiedObject

Return a proxied version of this instance.

If the instance has previously been “unproxied”, this returns a copy where all proxies are re-enabled.



294
295
296
# File 'lib/proxy_method.rb', line 294

def proxied
  self.dup.send(:reproxy!)
end

#unproxiedObject

Return an unproxied version of this instance.

This returns a copy of the instance where all proxies are disabled. This is sometimes necessary when a proxied method is being called by a different method outside your control.



284
285
286
# File 'lib/proxy_method.rb', line 284

def unproxied
  self.dup.send(:unproxy!)
end