Class: Liquid::Unless
Constant Summary
Constants inherited from If
Instance Attribute Summary
Attributes inherited from Tag
Instance Method Summary collapse
Methods inherited from If
Methods inherited from Block
#block_delimiter, #block_name, #create_variable, #end_tag, #parse, #unknown_tag
Methods inherited from Tag
Constructor Details
This class inherits a constructor from Liquid::If
Instance Method Details
#render(context) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/liquid/tags/unless.rb', line 6 def render(context) context.stack do # First condition is interpreted backwards ( if not ) block = @blocks.shift unless block.evaluate(context) return render_all(block., context) end # After the first condition unless works just like if @blocks.each do |block| if block.evaluate(context) return render_all(block., context) end end '' end end |