Sha256: cf5cb9e7dd3dc504c0d47e7ee80e9fe2cd600b3f1a734db6df0f5b1a5bc1dac9

Contents?: true

Size: 357 Bytes

Versions: 11

Compression:

Stored size: 357 Bytes

Contents

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 %}
  #
  class Break < Tag
    def interrupt
      BreakInterrupt.new
    end
  end

  Template.register_tag('break'.freeze, Break)
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
liquid-4.0.4 lib/liquid/tags/break.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/tags/break.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/tags/break.rb
liquid-4.0.3 lib/liquid/tags/break.rb
liquid-4.0.2 lib/liquid/tags/break.rb
liquid-4-0-2-4.0.2 lib/liquid/tags/break.rb
liquid-4.0.1 lib/liquid/tags/break.rb
liquid-4.0.0 lib/liquid/tags/break.rb
liquid-4.0.0.rc3 lib/liquid/tags/break.rb
liquid-4.0.0.rc2 lib/liquid/tags/break.rb
liquid-4.0.0.rc1 lib/liquid/tags/break.rb