Flowdock
method

find_method_or_attribute

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: MethodAttr
find_method_or_attribute(name) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/method_attr.rb, line 150
  def find_method_or_attribute name # :nodoc:
    return nil unless parent.respond_to? :ancestors

    searched = parent.ancestors
    kernel = RDoc::TopLevel.all_modules_hash['Kernel']

    searched << kernel if kernel &&
      parent != kernel && !searched.include?(kernel)

    searched.each do |ancestor|
      next if parent == ancestor
      next if String === ancestor

      other = ancestor.find_method_named('#' << name) ||
              ancestor.find_attribute_named(name)

      return other if other
    end

    nil
  end
Register or log in to add new notes.