Module: Babl::Operators::Continue::DSL

Included in:
Template
Defined in:
lib/babl/operators/continue.rb

Instance Method Summary collapse

Instance Method Details

#continueObject

Return a special placeholder that can be used as a switch(…) value. It tells BABL to continue the evaluation of the original chain after switch().



10
11
12
13
14
15
16
# File 'lib/babl/operators/continue.rb', line 10

def continue
    construct_terminal { |context|
        node = context[:continue]
        raise Errors::InvalidTemplate, 'continue() cannot be used outside switch()' unless node
        node
    }
end