Method: RDoc::ClassModule#ancestors
- Defined in:
- lib/rdoc/class_module.rb
#ancestors ⇒ Object Also known as: direct_ancestors
Ancestors list for this ClassModule: the list of included modules (classes will add their superclass if any).
Returns the included classes or modules, not the includes themselves. The returned values are either String or RDoc::NormalModule instances (see RDoc::Include#module).
The values are returned in reverse order of their inclusion, which is the order suitable for searching methods/attributes in the ancestors. The superclass, if any, comes last.
169 170 171 |
# File 'lib/rdoc/class_module.rb', line 169 def ancestors includes.map { |i| i.module }.reverse end |