class YARD::RegistryResolver

def collect_namespaces(object)

Collects and returns all inherited namespaces for a given object
def collect_namespaces(object)
  return [] unless object.respond_to?(:inheritance_tree)
  nss = object.inheritance_tree(true)
  if object.respond_to?(:superclass)
    nss |= [P('Object')] if object.superclass != P('BasicObject')
    nss |= [P('BasicObject')]
  end
  nss
end