method
find_method_or_attribute
v2_2_9 -
Show latest stable
- Class:
RDoc::MethodAttr
find_method_or_attribute(name)public
No documentation available.
# File lib/rdoc/method_attr.rb, line 177
def find_method_or_attribute name # :nodoc:
return nil unless parent.respond_to? :ancestors
searched = parent.ancestors
kernel = @store.modules_hash['Kernel']
searched << kernel if kernel &&
parent != kernel && !searched.include?(kernel)
searched.each do |ancestor|
next if String === ancestor
next if parent == ancestor
other = ancestor.find_method_named('#' << name) ||
ancestor.find_attribute_named(name)
return other if other
end
nil
end