Class: Expressir::Liquid::DataTypes::EnumerationDrop
- Inherits:
-
Expressir::Liquid::DataTypeDrop
- Object
- Liquid::Drop
- ModelElementDrop
- Expressir::Liquid::DataTypeDrop
- Expressir::Liquid::DataTypes::EnumerationDrop
- Defined in:
- lib/expressir/liquid/data_types/enumeration_drop.rb
Instance Method Summary collapse
- #based_on ⇒ Object
- #extensible ⇒ Object
-
#initialize(model) ⇒ EnumerationDrop
constructor
A new instance of EnumerationDrop.
- #items ⇒ Object
Methods inherited from ModelElementDrop
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_on ⇒ Object
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 |
#extensible ⇒ Object
12 13 14 |
# File 'lib/expressir/liquid/data_types/enumeration_drop.rb', line 12 def extensible @model.extensible end |
#items ⇒ Object
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 |