Class: Strling::Core::Lit
Overview
Represents a literal string match.
Matches the exact string value provided.
Instance Attribute Summary collapse
-
#value ⇒ String
The literal string value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Lit
constructor
A new instance of Lit.
- #to_dict ⇒ Object
Constructor Details
#initialize(value) ⇒ Lit
Returns a new instance of Lit.
146 147 148 |
# File 'lib/strling/core/nodes.rb', line 146 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ String
Returns The literal string value.
143 144 145 |
# File 'lib/strling/core/nodes.rb', line 143 def value @value end |
Instance Method Details
#to_dict ⇒ Object
150 151 152 |
# File 'lib/strling/core/nodes.rb', line 150 def to_dict { 'kind' => 'Lit', 'value' => value } end |