Add DefinedTypeObject#inheritance_tree

The `YARD::Registry#resolve` method assumes all subclasses of `NamespaceObject`
respond to `inheritance_tree`.

Ref commit d6a4791 for a similar case with `HostClassObject`.
This commit is contained in:
Charlie Sharpsteen 2014-06-01 18:01:32 -07:00
parent 6480bd3a41
commit a71c53f3d5
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,12 @@ module Puppetx::Yardoc::YARD::CodeObjects
# @return [Array<Array(String, String)>]
attr_accessor :parameters
# NOTE: `YARD::Registry#resolve` requires a method with this signature to
# be present on all subclasses of `NamespaceObject`.
def inheritance_tree(include_mods = false)
[self]
end
# FIXME: We used to override `self.new` to ensure no YARD proxies were
# created for namespaces segments that did not map to a host class or
# defined type. Fighting the system in this way turned out to be