Class: Generated::BeginWhileRule
- Defined in:
- lib/ruby_grammar_builder/generated/rule.rb
Instance Attribute Summary collapse
-
#begin ⇒ String
The begin pattern.
-
#beginCaptures ⇒ Hash<String=>Rule>
The captures rules for begin.
-
#contentName ⇒ String?
The name for the contents matched.
-
#name ⇒ String?
The name for this rule.
-
#while ⇒ String
The while pattern.
-
#whileCaptures ⇒ Hash<String=>Rule>
The captures rules for while.
Attributes inherited from Rule
Instance Method Summary collapse
-
#initialize(location) ⇒ BeginWhileRule
constructor
A new instance of BeginWhileRule.
- #to_h ⇒ Object
Constructor Details
#initialize(location) ⇒ BeginWhileRule
Returns a new instance of BeginWhileRule.
129 130 131 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 129 def initialize(location) super(location) end |
Instance Attribute Details
#begin ⇒ String
Returns The begin pattern.
117 118 119 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 117 def begin @begin end |
#beginCaptures ⇒ Hash<String=>Rule>
Returns The captures rules for begin.
125 126 127 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 125 def beginCaptures @beginCaptures end |
#contentName ⇒ String?
Returns The name for the contents matched.
123 124 125 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 123 def contentName @contentName end |
#name ⇒ String?
Returns The name for this rule.
121 122 123 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 121 def name @name end |
#while ⇒ String
Returns The while pattern.
119 120 121 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 119 def while @while end |
Instance Method Details
#to_h ⇒ Object
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/ruby_grammar_builder/generated/rule.rb', line 133 def to_h { "begin" => @begin, "while" => @while, "name" => @name, "contentName" => @contentName, "beginCaptures" => @beginCaptures.transform_values(&:to_h), "whileCaptures" => @whileCaptures.transform_values(&:to_h), }.compact end |