class Solargraph::Pin::Namespace

def completion_item_kind

def completion_item_kind
  (type == :class ? LanguageServer::CompletionItemKinds::CLASS : LanguageServer::CompletionItemKinds::MODULE)
end

def context

def context
  @context ||= ComplexType.parse("#{type.to_s.capitalize}<#{path}>")
end

def domains

def domains
  @domains ||= []
end

def infer api_map

def infer api_map
  # Assuming that namespace pins are always fully qualified
  return_complex_type
end

def initialize location, namespace, name, comments, type, visibility

def initialize location, namespace, name, comments, type, visibility
  super(location, namespace, name, comments)
  @type = type
  @visibility = visibility
end

def kind

def kind
  Pin::NAMESPACE
end

def path

def path
  @path ||= (namespace.empty? ? '' : "#{namespace}::") + name
end

def return_complex_type

def return_complex_type
  @return_complex_type ||= ComplexType.parse( (type == :class ? 'Class' : 'Module') + "<#{path}>" )
end

def scope

def scope
  context.scope
end

def symbol_kind

Returns:
  • (Integer) -
def symbol_kind
  (type == :class ? LanguageServer::SymbolKinds::CLASS : LanguageServer::SymbolKinds::MODULE)
end