class LanguageServer::Protocol::Interface::SelectionRange

Attributes

attributes[R]

Public Class Methods

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

  @attributes[:range] = range
  @attributes[:parent] = parent if parent

  @attributes.freeze
end

Public Instance Methods

parent() click to toggle source

The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.

@return [SelectionRange]

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

The [range](#Range) of this selection range.

@return [Range]

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