class Liquid::Condition
- Liquid::Condition
- Reference
- Object
Overview
Container for liquid nodes which conveniently wraps decision making logic
Example:
c = Condition.new("1", "==", "1") c.evaluate #=> true
Direct Known Subclasses
Defined in:
liquid/condition.crConstructors
Instance Method Summary
- #and(condition)
- #attach(attachment : Nil | Array(Liquid::Tag | Liquid::Variable | String))
- #attachment : Array(Liquid::Tag | Liquid::Variable | String)?
- #else?
- #evaluate(context = Context.new)
-
#inspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
- #left : Type
- #left=(left : Type)
- #operator : String | Nil
- #operator=(operator : String | Nil)
- #or(condition)
- #right : Type
- #right=(right : Type)
Constructor Detail
Instance Method Detail
def inspect
#
Description copied from class Object
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
.