Class: Lutaml::Uml::Package
- Inherits:
-
TopElement
- Object
- TopElement
- Lutaml::Uml::Package
- Includes:
- HasAttributes
- Defined in:
- lib/lutaml/uml/package.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children_packages ⇒ Object
readonly
Returns the value of attribute children_packages.
-
#classes ⇒ Object
Returns the value of attribute classes.
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#data_types ⇒ Object
Returns the value of attribute data_types.
-
#enums ⇒ Object
Returns the value of attribute enums.
-
#imports ⇒ Object
Returns the value of attribute imports.
Attributes inherited from TopElement
#comments, #definition, #href, #keyword, #name, #namespace, #stereotype, #visibility, #xmi_id, #xmi_uuid
Instance Method Summary collapse
- #diagrams ⇒ Object
- #diagrams=(value) ⇒ Object
-
#initialize(attributes) ⇒ Package
constructor
A new instance of Package.
- #packages ⇒ Object
- #packages=(value) ⇒ Object
Methods included from HasAttributes
Methods inherited from TopElement
Constructor Details
#initialize(attributes) ⇒ Package
Returns a new instance of Package.
11 12 13 14 |
# File 'lib/lutaml/uml/package.rb', line 11 def initialize(attributes) update_attributes(attributes) @children_packages ||= packages.map { |pkg| [pkg, pkg.packages, pkg.packages.map(&:children_packages)] }.flatten.uniq end |
Instance Attribute Details
#children_packages ⇒ Object (readonly)
Returns the value of attribute children_packages.
9 10 11 |
# File 'lib/lutaml/uml/package.rb', line 9 def children_packages @children_packages end |
#classes ⇒ Object
Returns the value of attribute classes.
9 10 11 |
# File 'lib/lutaml/uml/package.rb', line 9 def classes @classes end |
#contents ⇒ Object
Returns the value of attribute contents.
8 9 10 |
# File 'lib/lutaml/uml/package.rb', line 8 def contents @contents end |
#data_types ⇒ Object
Returns the value of attribute data_types.
9 10 11 |
# File 'lib/lutaml/uml/package.rb', line 9 def data_types @data_types end |
#enums ⇒ Object
Returns the value of attribute enums.
9 10 11 |
# File 'lib/lutaml/uml/package.rb', line 9 def enums @enums end |
#imports ⇒ Object
Returns the value of attribute imports.
8 9 10 |
# File 'lib/lutaml/uml/package.rb', line 8 def imports @imports end |
Instance Method Details
#diagrams ⇒ Object
48 49 50 |
# File 'lib/lutaml/uml/package.rb', line 48 def diagrams @diagrams || [] end |
#diagrams=(value) ⇒ Object
32 33 34 |
# File 'lib/lutaml/uml/package.rb', line 32 def diagrams=(value) @diagrams = value.to_a.map { |attributes| Diagram.new(attributes) } end |
#packages ⇒ Object
44 45 46 |
# File 'lib/lutaml/uml/package.rb', line 44 def packages @packages || [] end |