Module: Module::InstanceFunction

Defined in:
lib/core/facets/module/instance_function.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#singleton_method_added(meth) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/core/facets/module/instance_function.rb', line 56

def singleton_method_added(meth)
  this = self
  ##module_eval %{
  ##  def #{meth}(*args)
  ##    #{self.name}.#{meth}(self,*args)
  ##  end
  ##}
  module_eval do
    define_method(meth) do |*args|
      this.__send__(meth, self, *args)
    end
  end
  super(meth)
end