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