Class: Prism::Relocation::Source
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/prism/relocation.rb |
Overview
Represents the source of a repository that will be reparsed.
Class Method Summary
-
.new(value) ⇒ Source
constructor
Initialize the source with the given value.
Instance Attribute Summary
-
#value
readonly
The value that will need to be reparsed.
Instance Method Summary
-
#code_units_cache(encoding)
Create a code units cache for the given encoding.
-
#result
Reparse the value and return the parse result.
Constructor Details
.new(value) ⇒ Source
Initialize the source with the given value.
Instance Attribute Details
#value (readonly)
The value that will need to be reparsed.
# File 'lib/prism/relocation.rb', line 150
attr_reader :value
Instance Method Details
#code_units_cache(encoding)
Create a code units cache for the given encoding.
# File 'lib/prism/relocation.rb', line 163
def code_units_cache(encoding) result.code_units_cache(encoding) end
#result
Reparse the value and return the parse result.
# File 'lib/prism/relocation.rb', line 158
def result raise NotImplementedError, "Subclasses must implement #result" end