Class: Liquid::Break

Inherits:
Tag
  • Object
show all
Defined in:
lib/liquid/tags/break.rb

Overview

Break tag to be used to break out of a for loop.

Basic Usage:

{% for item in collection %}
  {% if item.condition %}
    {% break %}
  {% endif %}
{% endfor %}

Instance Attribute Summary

Attributes inherited from Tag

#context, #nodelist

Instance Method Summary collapse

Methods inherited from Tag

#initialize, #name, #parse, #render

Constructor Details

This class inherits a constructor from Liquid::Tag

Instance Method Details

#interruptObject



14
15
16
# File 'lib/liquid/tags/break.rb', line 14

def interrupt
  BreakInterrupt.new
end