Class: Rattler::Util::ParserSpecHelper::Matching

Inherits:
Parsing
  • Object
show all
Defined in:
lib/rattler/util/parser_spec_helper.rb

Instance Attribute Summary

Attributes inherited from Parsing

#parser

Instance Method Summary collapse

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

#resultObject



171
172
173
# File 'lib/rattler/util/parser_spec_helper.rb', line 171

def result
  @result ||= @parser.match(@rule_name)
end