Class: YARD::CodeObjects::ModuleObject
- Inherits:
-
NamespaceObject
- Object
- Base
- NamespaceObject
- YARD::CodeObjects::ModuleObject
- Defined in:
- lib/yard/code_objects/module_object.rb
Overview
Represents a Ruby module.
Direct Known Subclasses
Instance Method Summary collapse
-
#inheritance_tree(include_mods = false) ⇒ Array<NamespaceObject>
Returns the inheritance tree of mixins.
Constructor Details
This class inherits a constructor from YARD::CodeObjects::NamespaceObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class YARD::CodeObjects::Base
Instance Method Details
#inheritance_tree(include_mods = false) ⇒ Array<NamespaceObject>
Returns the inheritance tree of mixins.
9 10 11 12 13 14 15 16 |
# File 'lib/yard/code_objects/module_object.rb', line 9 def inheritance_tree(include_mods = false) return [self] unless include_mods [self] + mixins(:instance, :class).map do |m| next if m == self next m unless m.respond_to?(:inheritance_tree) m.inheritance_tree(true) end.compact.flatten.uniq end |