Fix signature of HostClassObject#inheritance_tree

The `YARD::Registry` expects all subclasses of `NamespaceObject` to accept one
argument when `inheritance_tree` is called.
This commit is contained in:
Charlie Sharpsteen 2014-05-27 20:49:31 -07:00
parent d226d08ddb
commit d6a4791c30
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ module Puppetx::Yardoc::YARD::CodeObjects
obj
end
def inheritance_tree
# 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.
def inheritance_tree(include_mods = false)
if parent_class.is_a?(HostClassObject)
# Cool. We got a host class. Return self + parent inheritance tree.
[self] + parent_class.inheritance_tree