class Liquid::Cycle

Overview

Cycle is usually used within a loop to alternate between values, like colors or DOM classes.

{% for item in items %}

{{ item }}
{% end %}

Item one
Item two
Item three
Item four
Item five

Defined in:

liquid/tags/cycle.cr

Constant Summary

NamedSyntax = /^(#{QuotedFragment})\s*\:\s*(.*)/
SimpleSyntax = /^#{QuotedFragment}+/

Constructors

Instance Method Summary

Instance methods inherited from class Liquid::Tag

name name, nodelist : Array(Liquid::Tag | Liquid::Variable | String) nodelist, nodelist=(nodelist : Array(Liquid::Tag | Liquid::Variable | String)) nodelist=, parse(tokens) parse, render(context) render

Constructor methods inherited from class Liquid::Tag

new(tag_name : String, markup : String, tokens) new

Constructor Detail

def self.new(tag_name, markup, tokens) #

[View source]

Instance Method Detail

def render(context) #

[View source]