Class: Lutaml::XMI::AttributeDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::XMI::AttributeDrop
- Includes:
- Parsers::XMIBase
- Defined in:
- lib/lutaml/xmi/liquid_drops/attribute_drop.rb
Instance Method Summary collapse
- #association ⇒ Object
- #cardinality ⇒ Object
- #definition ⇒ Object
- #id ⇒ Object
-
#initialize(model, options = {}) ⇒ AttributeDrop
constructor
rubocop:disable Lint/MissingSuper.
-
#is_derived ⇒ Object
rubocop:disable Naming/PredicateName.
- #name ⇒ Object
- #type ⇒ Object
- #type_ns ⇒ Object
- #xmi_id ⇒ Object
Methods included from Parsers::XMIBase
Constructor Details
#initialize(model, options = {}) ⇒ AttributeDrop
rubocop:disable Lint/MissingSuper
8 9 10 11 12 13 14 15 16 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 8 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
52 53 54 55 56 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 52 def association if @options[:with_assoc] && @model.association @model.association end end |
#cardinality ⇒ Object
38 39 40 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 38 def cardinality ::Lutaml::XMI::CardinalityDrop.new(@model) end |
#definition ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 42 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
18 19 20 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 18 def id @model.id end |
#is_derived ⇒ Object
rubocop:disable Naming/PredicateName
34 35 36 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 34 def is_derived # rubocop:disable Naming/PredicateName @model.is_derived end |
#name ⇒ Object
22 23 24 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 22 def name @model.name end |
#type ⇒ Object
26 27 28 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 26 def type lookup_entity_name(@uml_type_idref) || @uml_type_idref end |
#type_ns ⇒ Object
58 59 60 61 62 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 58 def type_ns if @options[:with_assoc] && @model.association get_ns_by_xmi_id(xmi_id) end end |
#xmi_id ⇒ Object
30 31 32 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 30 def xmi_id @uml_type_idref end |