Class: Lutaml::XMI::PackageDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::XMI::PackageDrop
- Defined in:
- lib/lutaml/xmi/liquid_drops/package_drop.rb
Instance Method Summary collapse
- #children_packages ⇒ Object
- #data_types ⇒ Object
- #definition ⇒ Object
- #diagrams ⇒ Object
- #enums ⇒ Object
-
#initialize(model) ⇒ PackageDrop
constructor
rubocop:disable Lint/MissingSuper.
- #klasses ⇒ Object (also: #classes)
- #name ⇒ Object
- #packages ⇒ Object
- #stereotype ⇒ Object
- #xmi_id ⇒ Object
Constructor Details
#initialize(model) ⇒ PackageDrop
rubocop:disable Lint/MissingSuper
6 7 8 9 10 11 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 6 def initialize(model) # rubocop:disable Lint/MissingSuper @model = model @children_packages ||= packages.map do |pkg| [pkg, pkg.packages, pkg.packages.map(&:children_packages)] end.flatten.uniq end |
Instance Method Details
#children_packages ⇒ Object
52 53 54 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 52 def children_packages @children_packages end |
#data_types ⇒ Object
34 35 36 37 38 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 34 def data_types @model[:data_types].map do |data_type| ::Lutaml::XMI::DataTypeDrop.new(data_type) end end |
#definition ⇒ Object
56 57 58 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 56 def definition @model[:definition] end |
#diagrams ⇒ Object
40 41 42 43 44 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 40 def diagrams @model[:diagrams].map do |diagram| ::Lutaml::XMI::DiagramDrop.new(diagram) end end |
#enums ⇒ Object
28 29 30 31 32 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 28 def enums @model[:enums].map do |enum| ::Lutaml::XMI::EnumDrop.new(enum) end end |
#klasses ⇒ Object Also known as: classes
21 22 23 24 25 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 21 def klasses @model[:classes].map do |klass| ::Lutaml::XMI::KlassDrop.new(klass) end end |
#name ⇒ Object
17 18 19 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 17 def name @model[:name] end |
#packages ⇒ Object
46 47 48 49 50 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 46 def packages @model[:packages].map do |package| ::Lutaml::XMI::PackageDrop.new(package) end end |
#stereotype ⇒ Object
60 61 62 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 60 def stereotype @model[:stereotype] end |
#xmi_id ⇒ Object
13 14 15 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 13 def xmi_id @model[:xmi_id] end |