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
- #absolute_path ⇒ Object
- #children_packages ⇒ Object
- #data_types ⇒ Object
- #definition ⇒ Object
- #diagrams ⇒ Object
- #enums ⇒ Object
-
#initialize(model, guidance = nil) ⇒ PackageDrop
constructor
rubocop:disable Lint/MissingSuper.
- #klasses ⇒ Object (also: #classes)
- #name ⇒ Object
- #packages ⇒ Object
- #stereotype ⇒ Object
- #xmi_id ⇒ Object
Constructor Details
#initialize(model, guidance = nil) ⇒ PackageDrop
rubocop:disable Lint/MissingSuper
6 7 8 9 10 11 12 13 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 6 def initialize(model, guidance = nil) # rubocop:disable Lint/MissingSuper @model = model @guidance = guidance @children_packages ||= packages.map do |pkg| [pkg, pkg.packages, pkg.packages.map(&:children_packages)] end.flatten.uniq end |
Instance Method Details
#absolute_path ⇒ Object
23 24 25 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 23 def absolute_path @model[:absolute_path] end |
#children_packages ⇒ Object
58 59 60 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 58 def children_packages @children_packages end |
#data_types ⇒ Object
40 41 42 43 44 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 40 def data_types @model[:data_types].map do |data_type| ::Lutaml::XMI::DataTypeDrop.new(data_type) end end |
#definition ⇒ Object
62 63 64 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 62 def definition @model[:definition] end |
#diagrams ⇒ Object
46 47 48 49 50 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 46 def diagrams @model[:diagrams].map do |diagram| ::Lutaml::XMI::DiagramDrop.new(diagram) end end |
#enums ⇒ Object
34 35 36 37 38 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 34 def enums @model[:enums].map do |enum| ::Lutaml::XMI::EnumDrop.new(enum) end end |
#klasses ⇒ Object Also known as: classes
27 28 29 30 31 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 27 def klasses @model[:classes].map do |klass| ::Lutaml::XMI::KlassDrop.new(klass, @guidance) end end |
#name ⇒ Object
19 20 21 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 19 def name @model[:name] end |
#packages ⇒ Object
52 53 54 55 56 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 52 def packages @model[:packages].map do |package| ::Lutaml::XMI::PackageDrop.new(package, @guidance) end end |
#stereotype ⇒ Object
66 67 68 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 66 def stereotype @model[:stereotype] end |
#xmi_id ⇒ Object
15 16 17 |
# File 'lib/lutaml/xmi/liquid_drops/package_drop.rb', line 15 def xmi_id @model[:xmi_id] end |