Class: Spoom::LSP::Position
- Inherits:
-
T::Struct
- Object
- T::Struct
- Spoom::LSP::Position
- Includes:
- PrintableSymbol
- Defined in:
- lib/spoom/sorbet/lsp/structures.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_json(json) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 24 def from_json(json) Position.new( line: json["line"].to_i, char: json["character"].to_i, ) end |
Instance Method Details
#accept_printer(printer) ⇒ Object
34 35 36 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 34 def accept_printer(printer) printer.print_colored("#{line}:#{char}", Color::LIGHT_BLACK) end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 39 def to_s "#{line}:#{char}" end |