Class: Expressir::Liquid::DataTypes::EnumerationDrop

Inherits:
Expressir::Liquid::DataTypeDrop show all
Defined in:
lib/expressir/liquid/data_types/enumeration_drop.rb

Instance Method Summary collapse

Methods inherited from ModelElementDrop

#_class, #file, #source

Constructor Details

#initialize(model) ⇒ EnumerationDrop

Returns a new instance of EnumerationDrop.



7
8
9
10
# File 'lib/expressir/liquid/data_types/enumeration_drop.rb', line 7

def initialize(model)
  @model = model
  super
end

Instance Method Details

#based_onObject



16
17
18
# File 'lib/expressir/liquid/data_types/enumeration_drop.rb', line 16

def based_on
  drop_klass_by_model(@model.based_on)
end

#extensibleObject



12
13
14
# File 'lib/expressir/liquid/data_types/enumeration_drop.rb', line 12

def extensible
  @model.extensible
end

#itemsObject



20
21
22
23
24
25
26
# File 'lib/expressir/liquid/data_types/enumeration_drop.rb', line 20

def items
  return [] unless @model.items

  @model.items.map do |item|
    ::Expressir::Liquid::DataTypes::EnumerationItemDrop.new(item)
  end
end