Class: Expressir::Liquid::Statements::IfDrop
- Inherits:
-
Expressir::Liquid::StatementDrop
- Object
- Liquid::Drop
- ModelElementDrop
- Expressir::Liquid::StatementDrop
- Expressir::Liquid::Statements::IfDrop
- Defined in:
- lib/expressir/liquid/statements/if_drop.rb
Instance Method Summary collapse
- #else_statements ⇒ Object
- #expression ⇒ Object
-
#initialize(model) ⇒ IfDrop
constructor
A new instance of IfDrop.
- #statements ⇒ Object
Methods inherited from ModelElementDrop
Constructor Details
#initialize(model) ⇒ IfDrop
Returns a new instance of IfDrop.
7 8 9 10 |
# File 'lib/expressir/liquid/statements/if_drop.rb', line 7 def initialize(model) @model = model super end |
Instance Method Details
#else_statements ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/expressir/liquid/statements/if_drop.rb', line 24 def else_statements return [] unless @model.else_statements @model.else_statements.map do |item| ::Expressir::Liquid::StatementDrop.new(item) end end |
#expression ⇒ Object
12 13 14 |
# File 'lib/expressir/liquid/statements/if_drop.rb', line 12 def expression drop_klass_by_model(@model.expression) end |
#statements ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/expressir/liquid/statements/if_drop.rb', line 16 def statements return [] unless @model.statements @model.statements.map do |item| ::Expressir::Liquid::StatementDrop.new(item) end end |