Class: PuppetX::PuppetLabs::Strings::YARD::CodeObjects::HostClassObject
- Inherits:
-
DefinedTypeObject
- Object
- YARD::CodeObjects::NamespaceObject
- PuppetNamespaceObject
- DefinedTypeObject
- PuppetX::PuppetLabs::Strings::YARD::CodeObjects::HostClassObject
- Defined in:
- lib/puppet_x/puppetlabs/strings/yard/code_objects/host_class_object.rb
Instance Attribute Summary collapse
-
#parent_class ⇒ HostClassObject, ...
The HostClassObject that this class inherits from, if any.
Attributes inherited from DefinedTypeObject
Attributes inherited from PuppetNamespaceObject
Instance Method Summary collapse
-
#inheritance_tree(include_mods = false) ⇒ Object
NOTE: ‘include_mods` is never used as it makes no sense for Puppet, but this is called by `YARD::Registry` and it will pass a parameter.
Methods inherited from DefinedTypeObject
Methods inherited from PuppetNamespaceObject
Instance Attribute Details
#parent_class ⇒ HostClassObject, ...
The PuppetX::PuppetLabs::Strings::YARD::CodeObjects::HostClassObject that this class inherits from, if any.
4 5 6 |
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/host_class_object.rb', line 4 def parent_class @parent_class end |
Instance Method Details
#inheritance_tree(include_mods = false) ⇒ Object
NOTE: ‘include_mods` is never used as it makes no sense for Puppet, but this is called by `YARD::Registry` and it will pass a parameter.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/host_class_object.rb', line 8 def inheritance_tree(include_mods = false) if parent_class.is_a?(PuppetX::PuppetLabs::Strings::YARD::CodeObjects::HostClassObject) # Cool. We got a host class. Return self + parent inheritance tree. [self] + parent_class.inheritance_tree elsif parent_class.is_a?(YARD::CodeObjects::Proxy) # We have a reference to a parent that has not been created yet. Just # return it. [self, parent_class] else # Most likely no parent class. But also possibly an object that we # shouldn't inherit from. Just return self. [self] end end |