class Ruby::Prism::Relocation::Entry

An entry in a repository that will lazily reify its values when they are first accessed.

Public Class Methods

Initialize a new entry with the given repository.

: (Repository repository) -> void

# File lib/ruby/prism/relocation.rb, line 59
def initialize(repository)
  @repository = repository
  @values = nil
end

Public Instance Methods

Fetch the leading and trailing comments of the value.

: () -> Array

# File lib/ruby/prism/relocation.rb, line 190
def comments
  [*leading_comments, *trailing_comments]
end

Fetch the end character column of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 153
def end_character_column
  fetch_value(:end_character_column)
end

Fetch the end character offset of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 109
def end_character_offset
  fetch_value(:end_character_offset)
end

Fetch the end code units column of the value, for the encoding that was configured on the repository.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 169
def end_code_units_column
  fetch_value(:end_code_units_column)
end

Fetch the end code units offset of the value, for the encoding that was configured on the repository.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 125
def end_code_units_offset
  fetch_value(:end_code_units_offset)
end

Fetch the end byte column of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 139
def end_column
  fetch_value(:end_column)
end

Fetch the end line of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 81
def end_line
  fetch_value(:end_line)
end

Fetch the end byte offset of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 95
def end_offset
  fetch_value(:end_offset)
end

Fetch the filepath of the value.

: () -> String

# File lib/ruby/prism/relocation.rb, line 67
def filepath
  fetch_value(:filepath)
end

Fetch the leading comments of the value.

: () -> Array

# File lib/ruby/prism/relocation.rb, line 176
def leading_comments
  fetch_value(:leading_comments)
end

Fetch the start character column of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 146
def start_character_column
  fetch_value(:start_character_column)
end

Fetch the start character offset of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 102
def start_character_offset
  fetch_value(:start_character_offset)
end

Fetch the start code units column of the value, for the encoding that was configured on the repository.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 161
def start_code_units_column
  fetch_value(:start_code_units_column)
end

Fetch the start code units offset of the value, for the encoding that was configured on the repository.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 117
def start_code_units_offset
  fetch_value(:start_code_units_offset)
end

Fetch the start byte column of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 132
def start_column
  fetch_value(:start_column)
end

Fetch the start line of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 74
def start_line
  fetch_value(:start_line)
end

Fetch the start byte offset of the value.

: () -> Integer

# File lib/ruby/prism/relocation.rb, line 88
def start_offset
  fetch_value(:start_offset)
end

Fetch the trailing comments of the value.

: () -> Array

# File lib/ruby/prism/relocation.rb, line 183
def trailing_comments
  fetch_value(:trailing_comments)
end