Class: Lutaml::XMI::GeneralizationAttributeDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::XMI::GeneralizationAttributeDrop
- Defined in:
- lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb
Instance Method Summary collapse
- #association ⇒ Object
- #cardinality ⇒ Object
- #definition ⇒ Object
- #gen_name ⇒ Object
- #has_association? ⇒ Boolean
- #id ⇒ Object
-
#initialize(attr, upper_klass, gen_name) ⇒ GeneralizationAttributeDrop
constructor
rubocop:disable Lint/MissingSuper.
- #is_derived ⇒ Object
- #name ⇒ Object
- #name_ns ⇒ Object
- #type ⇒ Object
- #type_ns ⇒ Object
- #upper_klass ⇒ Object
- #xmi_id ⇒ Object
Constructor Details
#initialize(attr, upper_klass, gen_name) ⇒ GeneralizationAttributeDrop
rubocop:disable Lint/MissingSuper
6 7 8 9 10 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 6 def initialize(attr, upper_klass, gen_name) # rubocop:disable Lint/MissingSuper @attr = attr @upper_klass = upper_klass @gen_name = gen_name end |
Instance Method Details
#association ⇒ Object
40 41 42 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 40 def association @attr[:association] end |
#cardinality ⇒ Object
32 33 34 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 32 def cardinality ::Lutaml::XMI::CardinalityDrop.new(@attr[:cardinality]) end |
#definition ⇒ Object
36 37 38 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 36 def definition @attr[:definition] end |
#gen_name ⇒ Object
56 57 58 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 56 def gen_name @gen_name end |
#has_association? ⇒ Boolean
44 45 46 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 44 def has_association? !!@attr[:association] end |
#id ⇒ Object
12 13 14 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 12 def id @attr[:id] end |
#is_derived ⇒ Object
28 29 30 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 28 def is_derived @attr[:is_derived] end |
#name ⇒ Object
16 17 18 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 16 def name @attr[:name] end |
#name_ns ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 60 def name_ns name_ns = case @attr[:type_ns] when "core", "gml" upper_klass else @attr[:type_ns] end name_ns = upper_klass if name_ns.nil? name_ns end |
#type ⇒ Object
20 21 22 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 20 def type @attr[:type] end |
#type_ns ⇒ Object
48 49 50 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 48 def type_ns @attr[:type_ns] end |
#upper_klass ⇒ Object
52 53 54 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 52 def upper_klass @upper_klass end |
#xmi_id ⇒ Object
24 25 26 |
# File 'lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb', line 24 def xmi_id @attr[:xmi_id] end |