Module: Serbea::Pipeline::Helper
- Defined in:
- lib/serbea/pipeline.rb
Overview
If you include this in any regular Ruby template environment (say ERB), you can then use Serbea-style pipeline code within the block, e.g.
‘pipe “Hello world” do upcase | split(“ ”) | join(“, ”) end`
> ‘HELLO, WORLD`
Instance Method Summary collapse
Instance Method Details
#pipe(input = nil, &blk) ⇒ Object
13 14 15 |
# File 'lib/serbea/pipeline.rb', line 13 def pipe(input = nil, &blk) Pipeline.new(binding, input).tap { _1.instance_exec(&blk) }.value end |