Sha256: dc8ea49c935d0a35e3aa1cbe9fe02536392c30f390e237cbc0d13c41248f464b
Contents?: true
Size: 501 Bytes
Versions: 5
Compression:
Stored size: 501 Bytes
Contents
# frozen_string_literal: true module Liquid # Continue tag to be used to break out of a for loop. # # == Basic Usage: # {% for item in collection %} # {% if item.condition %} # {% continue %} # {% endif %} # {% endfor %} # class Continue < Tag INTERRUPT = ContinueInterrupt.new.freeze def render_to_output_buffer(context, output) context.push_interrupt(INTERRUPT) output end end Template.register_tag('continue', Continue) end
Version data entries
5 entries across 5 versions & 1 rubygems