Class: Highway::Compiler::Analyze::Tree::Values::Primitive
- Defined in:
- lib/highway/compiler/analyze/tree/values/primitive.rb
Overview
This class represents a primitive value in the semantic tree. It consists of an array of segments.
Instance Attribute Summary collapse
-
#segments ⇒ Array<Highway::Compiler::Analyze::Tree::Segments::*>
(also: #flatten_segments)
readonly
The array of segments.
Instance Method Summary collapse
-
#initialize(segments) ⇒ Primitive
constructor
Initialize an instance.
Methods inherited from Base
#select_segments, #select_variable_segments, #select_variable_segments_with_scope
Constructor Details
#initialize(segments) ⇒ Primitive
Initialize an instance.
23 24 25 |
# File 'lib/highway/compiler/analyze/tree/values/primitive.rb', line 23 def initialize(segments) @segments = segments end |
Instance Attribute Details
#segments ⇒ Array<Highway::Compiler::Analyze::Tree::Segments::*> (readonly) Also known as: flatten_segments
The array of segments.
30 31 32 |
# File 'lib/highway/compiler/analyze/tree/values/primitive.rb', line 30 def segments @segments end |