class Spoom::LSP::SignatureHelp

Public Class Methods

from_json(json) click to toggle source
# File lib/spoom/sorbet/lsp/structures.rb, line 126
def self.from_json(json)
  SignatureHelp.new(
    label: json['label'],
    doc: json['documentation'],
    params: json['parameters'],
  )
end

Public Instance Methods

accept_printer(printer) click to toggle source
# File lib/spoom/sorbet/lsp/structures.rb, line 135
def accept_printer(printer)
  printer.print(label)
  printer.print("(")
  printer.print(params.map { |l| "#{l['label']}: #{l['documentation']}" }.join(", "))
  printer.print(")")
end
to_s() click to toggle source
# File lib/spoom/sorbet/lsp/structures.rb, line 142
def to_s
  "#{label}(#{params})."
end