Class: Aspen::CustomGrammar::AST::Nodes::CaptureSegment
- Inherits:
-
Object
- Object
- Aspen::CustomGrammar::AST::Nodes::CaptureSegment
- Defined in:
- lib/aspen/custom_grammar/ast/nodes/capture_segment.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#var_name ⇒ Object
readonly
Returns the value of attribute var_name.
Instance Method Summary collapse
-
#initialize(type:, var_name:, label:) ⇒ CaptureSegment
constructor
A new instance of CaptureSegment.
Constructor Details
#initialize(type:, var_name:, label:) ⇒ CaptureSegment
Returns a new instance of CaptureSegment.
9 10 11 12 13 |
# File 'lib/aspen/custom_grammar/ast/nodes/capture_segment.rb', line 9 def initialize(type: , var_name: , label: ) @type = type @var_name = var_name @label = label end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'lib/aspen/custom_grammar/ast/nodes/capture_segment.rb', line 7 def label @label end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/aspen/custom_grammar/ast/nodes/capture_segment.rb', line 7 def type @type end |
#var_name ⇒ Object (readonly)
Returns the value of attribute var_name.
7 8 9 |
# File 'lib/aspen/custom_grammar/ast/nodes/capture_segment.rb', line 7 def var_name @var_name end |