Class: Prism::Relocation::Entry
- Inherits:
-
Object
- Object
- Prism::Relocation::Entry
- Defined in:
- lib/prism/relocation.rb,
sig/generated/prism/relocation.rbs
Overview
An entry in a repository that will lazily reify its values when they are first accessed.
Defined Under Namespace
Classes: MissingValueError
Instance Method Summary collapse
-
#end_character_column ⇒ Integer
Fetch the end character column of the value.
-
#end_character_offset ⇒ Integer
Fetch the end character offset of the value.
-
#end_code_units_column ⇒ Integer
Fetch the end code units column of the value, for the encoding that was configured on the repository.
-
#end_code_units_offset ⇒ Integer
Fetch the end code units offset of the value, for the encoding that was configured on the repository.
-
#end_column ⇒ Integer
Fetch the end byte column of the value.
-
#end_line ⇒ Integer
Fetch the end line of the value.
-
#end_offset ⇒ Integer
Fetch the end byte offset of the value.
-
#filepath ⇒ String
Fetch the filepath of the value.
-
#initialize(repository) ⇒ Entry
constructor
Initialize a new entry with the given repository.
-
#reify!(values) ⇒ void
Reify the values on this entry with the given values.
-
#start_character_column ⇒ Integer
Fetch the start character column of the value.
-
#start_character_offset ⇒ Integer
Fetch the start character offset of the value.
-
#start_code_units_column ⇒ Integer
Fetch the start code units column of the value, for the encoding that was configured on the repository.
-
#start_code_units_offset ⇒ Integer
Fetch the start code units offset of the value, for the encoding that was configured on the repository.
-
#start_column ⇒ Integer
Fetch the start byte column of the value.
-
#start_line ⇒ Integer
Fetch the start line of the value.
-
#start_offset ⇒ Integer
Fetch the start byte offset of the value.
Constructor Details
#initialize(repository) ⇒ Entry
Initialize a new entry with the given repository.
: (Repository repository) -> void
57 58 59 60 |
# File 'lib/prism/relocation.rb', line 57 def initialize(repository) @repository = repository @values = nil end |
Instance Method Details
#end_character_column ⇒ Integer
Fetch the end character column of the value.
: () -> Integer
151 152 153 |
# File 'lib/prism/relocation.rb', line 151 def end_character_column fetch_value(:end_character_column) end |
#end_character_offset ⇒ Integer
Fetch the end character offset of the value.
: () -> Integer
107 108 109 |
# File 'lib/prism/relocation.rb', line 107 def end_character_offset fetch_value(:end_character_offset) end |
#end_code_units_column ⇒ Integer
Fetch the end code units column of the value, for the encoding that was configured on the repository.
: () -> Integer
167 168 169 |
# File 'lib/prism/relocation.rb', line 167 def end_code_units_column fetch_value(:end_code_units_column) end |
#end_code_units_offset ⇒ Integer
Fetch the end code units offset of the value, for the encoding that was configured on the repository.
: () -> Integer
123 124 125 |
# File 'lib/prism/relocation.rb', line 123 def end_code_units_offset fetch_value(:end_code_units_offset) end |
#end_column ⇒ Integer
Fetch the end byte column of the value.
: () -> Integer
137 138 139 |
# File 'lib/prism/relocation.rb', line 137 def end_column fetch_value(:end_column) end |
#end_line ⇒ Integer
Fetch the end line of the value.
: () -> Integer
79 80 81 |
# File 'lib/prism/relocation.rb', line 79 def end_line fetch_value(:end_line) end |
#end_offset ⇒ Integer
Fetch the end byte offset of the value.
: () -> Integer
93 94 95 |
# File 'lib/prism/relocation.rb', line 93 def end_offset fetch_value(:end_offset) end |
#filepath ⇒ String
Fetch the filepath of the value.
: () -> String
65 66 67 |
# File 'lib/prism/relocation.rb', line 65 def filepath fetch_value(:filepath) end |
#reify!(values) ⇒ void
This method returns an undefined value.
Reify the values on this entry with the given values. This is an internal-only API that is called from the repository when it is time to reify the values.
: (entry_values values) -> void
176 177 178 179 |
# File 'lib/prism/relocation.rb', line 176 def reify!(values) # :nodoc: @repository = nil @values = values end |
#start_character_column ⇒ Integer
Fetch the start character column of the value.
: () -> Integer
144 145 146 |
# File 'lib/prism/relocation.rb', line 144 def start_character_column fetch_value(:start_character_column) end |
#start_character_offset ⇒ Integer
Fetch the start character offset of the value.
: () -> Integer
100 101 102 |
# File 'lib/prism/relocation.rb', line 100 def start_character_offset fetch_value(:start_character_offset) end |
#start_code_units_column ⇒ Integer
Fetch the start code units column of the value, for the encoding that was configured on the repository.
: () -> Integer
159 160 161 |
# File 'lib/prism/relocation.rb', line 159 def start_code_units_column fetch_value(:start_code_units_column) end |
#start_code_units_offset ⇒ Integer
Fetch the start code units offset of the value, for the encoding that was configured on the repository.
: () -> Integer
115 116 117 |
# File 'lib/prism/relocation.rb', line 115 def start_code_units_offset fetch_value(:start_code_units_offset) end |
#start_column ⇒ Integer
Fetch the start byte column of the value.
: () -> Integer
130 131 132 |
# File 'lib/prism/relocation.rb', line 130 def start_column fetch_value(:start_column) end |
#start_line ⇒ Integer
Fetch the start line of the value.
: () -> Integer
72 73 74 |
# File 'lib/prism/relocation.rb', line 72 def start_line fetch_value(:start_line) end |
#start_offset ⇒ Integer
Fetch the start byte offset of the value.
: () -> Integer
86 87 88 |
# File 'lib/prism/relocation.rb', line 86 def start_offset fetch_value(:start_offset) end |