class

Liquid::Condition

Inherits Reference / Object

Container for liquid nodes which conveniently wraps decision making logic

Example:

c = Condition.new("1", "==", "1") c.evaluate #=> true

Constructors

new(left = nil, operator = nil, right = nil)
Source

Instance methods

and(condition)
Source
attach(attachment : Nil | Array(Liquid::Tag | Liquid::Variable | String))
Source
attachment
Source
else?
Source
evaluate(context = Context.new)
Source
inspect

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.

Source
left
Source
left=(left : Type)
Source
operator
Source
operator=(operator : String | Nil)
Source
or(condition)
Source
right
Source
right=(right : Type)
Source