Class: Liquid2::Empty
- Inherits:
-
Expression
- Object
- Expression
- Liquid2::Empty
- Defined in:
- lib/liquid2/expressions/blank.rb
Overview
The special value empty.
Instance Attribute Summary
Attributes inherited from Expression
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #evaluate(_context) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Expression
#children, #initialize, #scope
Constructor Details
This class inherits a constructor from Liquid2::Expression
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
31 32 33 34 35 |
# File 'lib/liquid2/expressions/blank.rb', line 31 def ==(other) return other.empty? if other.respond_to?(:empty?) other.is_a?(Empty) end |
#evaluate(_context) ⇒ Object
27 28 29 |
# File 'lib/liquid2/expressions/blank.rb', line 27 def evaluate(_context) self end |
#to_s ⇒ Object
39 |
# File 'lib/liquid2/expressions/blank.rb', line 39 def to_s = "" |