Class: Lutaml::Uml::TopElement
- Inherits:
-
Object
- Object
- Lutaml::Uml::TopElement
- Includes:
- HasAttributes
- Defined in:
- lib/lutaml/uml/top_element.rb
Direct Known Subclasses
SysMl::Allocated, SysMl::DeriveRequirement, SysMl::Refine, SysMl::RequirementRelated, SysMl::TestCase, SysMl::Trace, Association, Classifier, Connector, ConnectorEnd, Constraint, Dependency, Diagram, Event, Instance, Package, Property, Region, Transition, Trigger, Vertex
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#href ⇒ Object
Returns the value of attribute href.
-
#keyword ⇒ Object
Returns the value of attribute keyword.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#stereotype ⇒ Object
Returns the value of attribute stereotype.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
-
#xmi_id ⇒ Object
Returns the value of attribute xmi_id.
-
#xmi_uuid ⇒ Object
Returns the value of attribute xmi_uuid.
Instance Method Summary collapse
-
#full_name ⇒ Object
rubocop:enable Rails/ActiveRecordAliases.
-
#initialize(attributes = {}) ⇒ TopElement
constructor
rubocop:disable Rails/ActiveRecordAliases.
Methods included from HasAttributes
Constructor Details
#initialize(attributes = {}) ⇒ TopElement
rubocop:disable Rails/ActiveRecordAliases
20 21 22 23 24 |
# File 'lib/lutaml/uml/top_element.rb', line 20 def initialize(attributes = {}) @visibility = "public" @name = attributes["name"] update_attributes(attributes) end |
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def comments @comments end |
#definition ⇒ Object
Returns the value of attribute definition.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def definition @definition end |
#href ⇒ Object
Returns the value of attribute href.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def href @href end |
#keyword ⇒ Object
Returns the value of attribute keyword.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def keyword @keyword end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def namespace @namespace end |
#stereotype ⇒ Object
Returns the value of attribute stereotype.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def stereotype @stereotype end |
#visibility ⇒ Object
Returns the value of attribute visibility.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def visibility @visibility end |
#xmi_id ⇒ Object
Returns the value of attribute xmi_id.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def xmi_id @xmi_id end |
#xmi_uuid ⇒ Object
Returns the value of attribute xmi_uuid.
8 9 10 |
# File 'lib/lutaml/uml/top_element.rb', line 8 def xmi_uuid @xmi_uuid end |
Instance Method Details
#full_name ⇒ Object
rubocop:enable Rails/ActiveRecordAliases
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/lutaml/uml/top_element.rb', line 27 def full_name if name == nil return nil end the_name = name next_namespace = namespace while !next_namespace.nil? the_name = if !next_namespace.name.nil? next_namespace.name + "::" + the_name else "::" + the_name end next_namespace = next_namespace.namespace end the_name end |