Class: Rattler::Util::ParserSpecHelper::Parsing
- Inherits:
-
Object
- Object
- Rattler::Util::ParserSpecHelper::Parsing
- Defined in:
- lib/rattler/util/parser_spec_helper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
- #failure ⇒ Object
- #from(pos) ⇒ Object
-
#initialize(parser) ⇒ Parsing
constructor
:nodoc:.
- #pos ⇒ Object
- #result ⇒ Object
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
#parser ⇒ Object (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
#failure ⇒ Object
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 |
#pos ⇒ Object
157 158 159 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 157 def pos @parser.pos end |
#result ⇒ Object
154 155 156 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 154 def result @result ||= @parser.parse end |