Class: Lutaml::Xmi::LiquidDrops::AttributeDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::Xmi::LiquidDrops::AttributeDrop
- Includes:
- Parsers::XmiBase
- Defined in:
- lib/lutaml/xmi/liquid_drops/attribute_drop.rb
Instance Method Summary collapse
- #association ⇒ Object
- #association_connector ⇒ Object
- #cardinality ⇒ Object
- #definition ⇒ Object
- #id ⇒ Object
-
#initialize(model, options = {}) ⇒ AttributeDrop
constructor
rubocop:disable Lint/MissingSuper.
-
#is_derived ⇒ Object
rubocop:disable Naming/PredicateName,Naming/PredicatePrefix.
- #name ⇒ Object
- #stereotype ⇒ Object
- #type ⇒ Object
- #type_ns ⇒ Object
- #xmi_id ⇒ Object
Methods included from Parsers::XmiBase
Constructor Details
#initialize(model, options = {}) ⇒ AttributeDrop
rubocop:disable Lint/MissingSuper
9 10 11 12 13 14 15 16 17 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 9 def initialize(model, = {}) # rubocop:disable Lint/MissingSuper @model = model @options = @xmi_root_model = [:xmi_root_model] @id_name_mapping = [:id_name_mapping] uml_type = @model.uml_type @uml_type_idref = uml_type.idref if uml_type end |
Instance Method Details
#association ⇒ Object
53 54 55 56 57 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 53 def association if @options[:with_assoc] && @model.association @model.association end end |
#association_connector ⇒ Object
59 60 61 62 63 64 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 59 def association_connector connector = fetch_connector(@model.association) if connector ::Lutaml::Xmi::LiquidDrops::ConnectorDrop.new(connector, @options) end end |
#cardinality ⇒ Object
39 40 41 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 39 def cardinality ::Lutaml::Xmi::LiquidDrops::CardinalityDrop.new(@model) end |
#definition ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 43 def definition definition = lookup_attribute_documentation(@model.id) if @options[:with_assoc] && @model.association definition = loopup_assoc_def(@model.association) end definition end |
#id ⇒ Object
19 20 21 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 19 def id @model.id end |
#is_derived ⇒ Object
rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
35 36 37 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 35 def is_derived # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix @model.is_derived end |
#name ⇒ Object
23 24 25 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 23 def name @model.name end |
#stereotype ⇒ Object
72 73 74 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 72 def stereotype doc_node_attribute_value(@uml_type_idref, "stereotype") end |
#type ⇒ Object
27 28 29 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 27 def type lookup_entity_name(@uml_type_idref) || @uml_type_idref end |
#type_ns ⇒ Object
66 67 68 69 70 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 66 def type_ns if @options[:with_assoc] && @model.association get_ns_by_xmi_id(xmi_id) end end |
#xmi_id ⇒ Object
31 32 33 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 31 def xmi_id @uml_type_idref end |