Class: Rsec::Pattern
- Defined in:
- lib/rsec/parsers/misc.rb,
lib/rsec/helpers.rb
Overview
matches a pattern
Instance Attribute Summary
Attributes inherited from Unary
Attributes included from Parser
Instance Method Summary collapse
- #_parse(ctx) ⇒ Object
-
#until(&p) ⇒ Object
@ desc.r Scan until the pattern happens.
Methods included from Parser
#&, #*, #<<, #>>, #^, #cached, #eof, #fail, #inspect, #join, #map, #maybe, #parse, #parse!, #star, #|
Instance Method Details
#_parse(ctx) ⇒ Object
89 90 91 |
# File 'lib/rsec/parsers/misc.rb', line 89 def _parse ctx ctx.scan some() or INVALID end |
#until(&p) ⇒ Object
@ desc.r
Scan until the pattern happens
393 394 395 |
# File 'lib/rsec/helpers.rb', line 393 def until &p UntilPattern[some()].map p end |