Sha256: eab84449ade6b20ac1a337c949ed49b5c6ca7c04d8f4ef2e1b925905d34bf6cd
Contents?: true
Size: 668 Bytes
Versions: 14
Compression:
Stored size: 668 Bytes
Contents
# frozen_string_literal: true module Liquid # Break tag to be used to break out of a for loop. # # == Basic Usage: # {% for item in collection %} # {% if item.condition %} # {% break %} # {% endif %} # {% endfor %} # # @liquid_public_docs # @liquid_type tag # @liquid_category iteration # @liquid_name break # @liquid_summary # Stops a [`for` loop](/docs/api/liquid/tags/for) from iterating. # @liquid_syntax # {% break %} class Break < Tag INTERRUPT = BreakInterrupt.new.freeze def render_to_output_buffer(context, output) context.push_interrupt(INTERRUPT) output end end end
Version data entries
14 entries across 14 versions & 1 rubygems