Class: Highway::Compiler::Parse::Tree::Variable
- Inherits:
-
Object
- Object
- Highway::Compiler::Parse::Tree::Variable
- Defined in:
- lib/highway/compiler/parse/tree/variable.rb
Overview
This class represents a variable node in a parse tree. It contains information about a single variable.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name of the variable.
-
#preset ⇒ String
readonly
Parent preset of the variable.
-
#value ⇒ String
readonly
Raw value of the variable.
Instance Method Summary collapse
-
#initialize(name:, value:, preset:) ⇒ Variable
constructor
Initialize an instance.
Constructor Details
#initialize(name:, value:, preset:) ⇒ Variable
Initialize an instance.
22 23 24 25 26 |
# File 'lib/highway/compiler/parse/tree/variable.rb', line 22 def initialize(name:, value:, preset:) @name = name @value = value @preset = preset end |
Instance Attribute Details
#name ⇒ String (readonly)
Name of the variable.
31 32 33 |
# File 'lib/highway/compiler/parse/tree/variable.rb', line 31 def name @name end |
#preset ⇒ String (readonly)
Parent preset of the variable.
41 42 43 |
# File 'lib/highway/compiler/parse/tree/variable.rb', line 41 def preset @preset end |
#value ⇒ String (readonly)
Raw value of the variable.
36 37 38 |
# File 'lib/highway/compiler/parse/tree/variable.rb', line 36 def value @value end |