class Solargraph::Pin::Method

def completion_item_kind

def completion_item_kind
  Solargraph::LanguageServer::CompletionItemKinds::METHOD
end

def documentation

def documentation
  if @documentation.nil?
    @documentation ||= super || ''
    unless docstring.nil?
      param_tags = docstring.tags(:param)
      unless param_tags.nil? or param_tags.empty?
        @documentation += "\n\n"
        @documentation += "Params:\n"
        lines = []
        param_tags.each do |p|
          l = "* #{p.name}"
          l += " [#{p.types.join(', ')}]" unless p.types.empty?
          l += " #{p.text}"
          lines.push l
        end
        @documentation += lines.join("\n")
      end
    end
  end
  @documentation
end

def initialize location, namespace, name, docstring, scope, visibility, args

def initialize location, namespace, name, docstring, scope, visibility, args
  super(location, namespace, name, docstring)
  @scope = scope
  @visibility = visibility
  @parameters = args
end

def kind

def kind
  Solargraph::Pin::METHOD
end

def params

Returns:
  • (Array) -

Other tags:
    Todo: - This method was temporarily migrated directly from Suggestion
def params
  if @params.nil?
    @params = []
    return @params if docstring.nil?
    param_tags = docstring.tags(:param)
    unless param_tags.empty?
      param_tags.each do |t|
        txt = t.name.to_s
        txt += " [#{t.types.join(',')}]" unless t.types.nil? or t.types.empty?
        txt += " #{t.text}" unless t.text.nil? or t.text.empty?
        @params.push txt
      end
    end
  end
  @params
end

def path

def path
  @path ||= namespace + (scope == :instance ? '#' : '.') + name
end

def return_type

def return_type
  if @return_type.nil? and !docstring.nil?
    tag = docstring.tag(:return)
    if tag.nil?
      ol = docstring.tag(:overload)
      tag = ol.tag(:return) unless ol.nil?
    end
    @return_type = tag.types[0] unless tag.nil? or tag.types.nil?
  end
  @return_type
end

def symbol_kind

Returns:
  • (Integer) -
def symbol_kind
  LanguageServer::SymbolKinds::METHOD
end