Class: Expressir::Liquid::Expressions::AggregateInitializerDrop

Inherits:
Expressir::Liquid::ExpressionDrop show all
Defined in:
lib/expressir/liquid/expressions/aggregate_initializer_drop.rb

Instance Method Summary collapse

Methods inherited from ModelElementDrop

#_class, #file, #source

Constructor Details

#initialize(model) ⇒ AggregateInitializerDrop

Returns a new instance of AggregateInitializerDrop.



7
8
9
10
# File 'lib/expressir/liquid/expressions/aggregate_initializer_drop.rb', line 7

def initialize(model)
  @model = model
  super
end

Instance Method Details

#itemsObject



12
13
14
15
16
17
18
19
20
# File 'lib/expressir/liquid/expressions/aggregate_initializer_drop.rb', line 12

def items
  return [] unless @model.items

  @model.items.map do |item|
    ::Expressir::Liquid::Expressions::AggregateInitializerItemDrop.new(
      item,
    )
  end
end