Sha256: 926297a248fca6442d2db0fd8cffc85316bd0baf190cf782be65ae07e45d1ae8

Contents?: true

Size: 353 Bytes

Versions: 7

Compression:

Stored size: 353 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', Break)
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
liquid-2.6.3 lib/liquid/tags/break.rb
liquid-2.6.2 lib/liquid/tags/break.rb
liquid-2.6.1 lib/liquid/tags/break.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/liquid-2.6.0/lib/liquid/tags/break.rb
liquid-2.6.0 lib/liquid/tags/break.rb
liquid-2.6.0.rc1 lib/liquid/tags/break.rb
locomotivecms-liquid-2.6.0 lib/liquid/tags/break.rb