Represents the source of a repository that will be reparsed.
Attributes
Read
The value that will need to be reparsed.
Class Methods
::
lib/prism/relocation.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/prism/relocation.rb, line 153
def initialize(value)
@value = value
end
Initialize the source with the given value.
Instance Methods
lib/prism/relocation.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/prism/relocation.rb, line 163
def code_units_cache(encoding)
result.code_units_cache(encoding)
end
Create a code units cache for the given encoding.
#
lib/prism/relocation.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/prism/relocation.rb, line 158
def result
raise NotImplementedError, "Subclasses must implement #result"
end
Reparse the value and return the parse result.