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:



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

def initialize(parser)
  @parser = parser
end

Instance Attribute Details

#parserObject (readonly)

Returns the value of attribute parser.



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

def parser
  @parser
end

Instance Method Details

#failureObject



164
165
166
# File 'lib/rattler/util/parser_spec_helper.rb', line 164

def failure
  @parser.failure
end

#from(pos) ⇒ Object



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

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

#posObject



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

def pos
  @parser.pos
end

#resultObject



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

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