Module: Babl::Operators::With::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/with.rb
Instance Method Summary collapse
-
#with(*templates, &block) ⇒ Object
Produce a value by calling the block, passing it the output value of the templates passed as argument.
Instance Method Details
#with(*templates, &block) ⇒ Object
Produce a value by calling the block, passing it the output value of the templates passed as argument.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/babl/operators/with.rb', line 6 def with(*templates, &block) construct_node(key: nil, continue: nil) do |node, context| WithNode.new(node, templates.map do |t| unscoped.call(t).builder.precompile( Rendering::InternalValueNode.instance, context.merge(continue: nil) ) end, block) end end |