module Babl::Operators::With::DSL
Public Instance Methods
with(*templates, &block)
click to toggle source
Produce a value by calling the block, passing it the output value of the templates passed as argument.
# File lib/babl/operators/with.rb, line 9 def with(*templates, &block) templates = templates.map { |t| unscoped.reset_continue.call(t) } construct_node { |node, context| Nodes::With.new(node, templates.map { |t| t.builder.precompile( Nodes::InternalValue.instance, context ) }, block) }.reset_key.reset_continue end