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:
150 151 152 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 150 def initialize(parser) @parser = parser end |
Instance Attribute Details
#parser ⇒ Object (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
#failure ⇒ Object
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 |
#pos ⇒ Object
161 162 163 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 161 def pos @parser.pos end |
#result ⇒ Object
158 159 160 |
# File 'lib/rattler/util/parser_spec_helper.rb', line 158 def result @result ||= @parser.parse end |