Class: Lutaml::Xmi::LiquidDrops::AttributeDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::Xmi::LiquidDrops::AttributeDrop
- 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
Constructor Details
#initialize(model, options = {}) ⇒ AttributeDrop
rubocop:disable Lint/MissingSuper
7 8 9 10 11 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 7 def initialize(model, = {}) # rubocop:disable Lint/MissingSuper @model = model @options = @lookup = [:lookup] end |
Instance Method Details
#association ⇒ Object
45 46 47 48 49 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 45 def association if @options[:with_assoc] && @model.association @model.association end end |
#association_connector ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 51 def association_connector return unless @model.association connector = @lookup.fetch_connector(@model.association) if connector ::Lutaml::Xmi::LiquidDrops::ConnectorDrop.new(connector, @options) end end |
#cardinality ⇒ Object
33 34 35 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 33 def cardinality ::Lutaml::Xmi::LiquidDrops::CardinalityDrop.new(@model.cardinality) end |
#definition ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 37 def definition if @options[:with_assoc] && @model.association @lookup.loopup_assoc_def(@model.association) else @model.definition end end |
#id ⇒ Object
13 14 15 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 13 def id @model.id end |
#is_derived ⇒ Object
rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
29 30 31 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 29 def is_derived # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix @model.is_derived end |
#name ⇒ Object
17 18 19 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 17 def name @model.name end |
#stereotype ⇒ Object
66 67 68 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 66 def stereotype @lookup.doc_node_attribute_value(@model.xmi_id, "stereotype") end |
#type ⇒ Object
21 22 23 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 21 def type @model.type end |
#type_ns ⇒ Object
60 61 62 63 64 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 60 def type_ns if @options[:with_assoc] && @model.association @model.type_ns end end |
#xmi_id ⇒ Object
25 26 27 |
# File 'lib/lutaml/xmi/liquid_drops/attribute_drop.rb', line 25 def xmi_id @model.xmi_id end |