class YARD::Handlers::Ruby::ClassHandler

def parse_superclass(superclass)

def parse_superclass(superclass)
  return nil unless superclass
  case superclass.type
  when :var_ref
    return namespace.path if superclass.first == s(:kw, "self")
    return superclass.source if superclass.first.type == :const
  when :const, :const_ref, :const_path_ref, :top_const_ref
    return superclass.source
  when :fcall, :command
    methname = superclass.method_name.source
    return superclass.parameters.first.source if methname == "DelegateClass"
    return methname if superclass.method_name.type == :const
  when :call, :command_call
    cname = superclass.namespace.source
    if cname =~ /^O?Struct$/ && superclass.method_name(true) == :new
      return cname
    end
  end
  nil
end