Class: Module

Inherits:
Object show all
Defined in:
lib/backports/1.8.7/method.rb,
lib/backports/1.8.7/module.rb,
lib/backports/rails/module.rb

Instance Method Summary collapse

Instance Method Details

#alias_method_chain(target, feature) ⇒ Object

Standard in rails… See official documentation



3
4
5
# File 'lib/backports/rails/module.rb', line 3

def alias_method_chain(target, feature)
  Backports.alias_method_chain(self, target, feature)
end

#instance_method_with_additional_info(name) ⇒ Object



39
40
41
42
43
44
# File 'lib/backports/1.8.7/method.rb', line 39

def instance_method_with_additional_info(name)
  instance_method_without_additional_info(name).tap do |unbound|
    unbound.name = name.to_sym
    unbound.owner = ancestors.find{|mod| mod.instance_methods(false).include? name.to_s}
  end
end

#module_exec(*arg, &block) ⇒ Object Also known as: class_exec

Can’t use alias_method here because of jruby (see jira.codehaus.org/browse/JRUBY-2435 )



3
4
5
# File 'lib/backports/1.8.7/module.rb', line 3

def module_exec(*arg, &block)
  instance_exec(*arg, &block)
end