Class: Rattler::Util::ParserSpecHelper::Matching
- Defined in:
- lib/rattler/util/parser_spec_helper.rb
Instance Attribute Summary
Attributes inherited from Parsing
Instance Method Summary collapse
-
#as(rule_name) ⇒ Object
:nodoc:.
- #result ⇒ Object
Methods inherited from Parsing
#failure, #from, #initialize, #pos
Constructor Details
This class inherits a constructor from Rattler::Util::ParserSpecHelper::Parsing
Instance Method Details
#as(rule_name) ⇒ Object
:nodoc:
167 168 169 170 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 167 def as(rule_name) @rule_name = rule_name self end |
#result ⇒ Object
171 172 173 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 171 def result @result ||= @parser.match(@rule_name) end |