Class: SuperProxy

Inherits:
Object show all
Defined in:
lib/rfm/utilities/core_ext.rb

Overview

Allows access to superclass object

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ SuperProxy

Returns a new instance of SuperProxy.



142
143
144
# File 'lib/rfm/utilities/core_ext.rb', line 142

def initialize(obj)
  @obj = obj
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



146
147
148
# File 'lib/rfm/utilities/core_ext.rb', line 146

def method_missing(meth, *args, &blk)
  @obj.class.superclass.instance_method(meth).bind(@obj).call(*args, &blk)
end