Class: Rattler::Util::ParserSpecHelper::Parsing

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

Direct Known Subclasses

Matching

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parser) ⇒ Parsing

:nodoc:



146
147
148
# File 'lib/rattler/util/parser_spec_helper.rb', line 146

def initialize(parser)
  @parser = parser
end

Instance Attribute Details

#parserObject (readonly)

Returns the value of attribute parser.



149
150
151
# File 'lib/rattler/util/parser_spec_helper.rb', line 149

def parser
  @parser
end

Instance Method Details

#failureObject



160
161
162
# File 'lib/rattler/util/parser_spec_helper.rb', line 160

def failure
  @parser.failure
end

#from(pos) ⇒ Object



150
151
152
153
# File 'lib/rattler/util/parser_spec_helper.rb', line 150

def from(pos)
  @parser.pos = pos
  self
end

#posObject



157
158
159
# File 'lib/rattler/util/parser_spec_helper.rb', line 157

def pos
  @parser.pos
end

#resultObject



154
155
156
# File 'lib/rattler/util/parser_spec_helper.rb', line 154

def result
  @result ||= @parser.parse
end