class RubyLsp::ResponseBuilders::TestCollection
: [ResponseType = Requests::Support::TestItem]
def [](id)
def [](id) @items[id] end
def add(item)
def add(item) @items[item.id] = item end
def add_code_lens(item)
def add_code_lens(item) arguments = [item.uri.to_standardized_path, item.id] start = item.range.start range = Interface::Range.new( start: start, end: Interface::Position.new(line: start.line, character: start.character + 1), ) @code_lens << Interface::CodeLens.new( range: range, data: { arguments: arguments, kind: "run_test" }, ) @code_lens << Interface::CodeLens.new( range: range, data: { arguments: arguments, kind: "run_test_in_terminal" }, ) @code_lens << Interface::CodeLens.new( range: range, data: { arguments: arguments, kind: "debug_test" }, ) end
def initialize
def initialize super @items = {} #: Hash[String, ResponseType] @code_lens = [] #: Array[Interface::CodeLens] end
def response
@override
def response @items.values end