Module: Parslet::Atoms::DSL
- Defined in:
- lib/nose/parser.rb
Overview
Extend the DSL to with some additional ways to capture the output
Instance Method Summary collapse
-
#as_array(name) ⇒ Array<Parslet::Atoms::Named>
Like #as, but ensures that the result is always an array.
-
#capture_source(name) ⇒ CaptureSource
Capture some output along with the source string.
Instance Method Details
#as_array(name) ⇒ Array<Parslet::Atoms::Named>
Like #as, but ensures that the result is always an array
47 48 49 |
# File 'lib/nose/parser.rb', line 47 def as_array(name) Parslet::Atoms::Named.new(self, name, true) end |
#capture_source(name) ⇒ CaptureSource
Capture some output along with the source string
53 54 55 |
# File 'lib/nose/parser.rb', line 53 def capture_source(name) CaptureSource.new(self, name) end |