Module: RightSupport::Ruby::EasySingleton::ClassMethods
- Defined in:
- lib/right_support/ruby/easy_singleton.rb
Instance Method Summary
(collapse)
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(meth, *args)
6
7
8
9
10
11
12
|
# File 'lib/right_support/ruby/easy_singleton.rb', line 6
def method_missing(meth, *args)
if self.instance && self.instance.respond_to?(meth)
self.instance.__send__(meth, *args)
else
super
end
end
|
Instance Method Details
- (Boolean) respond_to?(meth)
14
15
16
|
# File 'lib/right_support/ruby/easy_singleton.rb', line 14
def respond_to?(meth)
super(meth) || self.instance.respond_to?(meth)
end
|