class LanguageServer::Protocol::Interface::Range

Attributes

attributes[R]

Public Class Methods

new(start:, end:) click to toggle source
# File lib/language_server/protocol/interface/range.rb, line 5
def initialize(start:, end:)
  @attributes = {}

  @attributes[:start] = start
  @attributes[:end] = binding.local_variable_get(:end)

  @attributes.freeze
end

Public Instance Methods

end() click to toggle source

The range's end position.

@return [Position]

# File lib/language_server/protocol/interface/range.rb, line 26
def end
  attributes.fetch(:end)
end
start() click to toggle source

The range's start position.

@return [Position]

# File lib/language_server/protocol/interface/range.rb, line 18
def start
  attributes.fetch(:start)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/range.rb, line 32
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/range.rb, line 36
def to_json(*args)
  to_hash.to_json(*args)
end