Class: Lutaml::Xmi::LiquidDrops::AssociationDrop

Inherits:
Liquid::Drop
  • Object
show all
Includes:
Parsers::XmiBase
Defined in:
lib/lutaml/xmi/liquid_drops/association_drop.rb

Instance Method Summary collapse

Methods included from Parsers::XmiBase

included, #set_xmi_model

Constructor Details

#initialize(xmi_id:, member_end:, member_end_type:, member_end_cardinality:, member_end_attribute_name:, member_end_xmi_id:, owner_end:, owner_end_xmi_id:, definition:, options:) ⇒ AssociationDrop

rubocop:disable Lint/MissingSuper,Metrics/ParameterLists,Metrics/MethodLength



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 9

def initialize( # rubocop:disable Lint/MissingSuper,Metrics/ParameterLists,Metrics/MethodLength
  xmi_id:,
  member_end:,
  member_end_type:,
  member_end_cardinality:,
  member_end_attribute_name:,
  member_end_xmi_id:,
  owner_end:,
  owner_end_xmi_id:,
  definition:,
  options:
)
  @xmi_id = xmi_id
  @member_end = member_end
  @member_end_type = member_end_type
  @member_end_cardinality = member_end_cardinality
  @member_end_attribute_name = member_end_attribute_name
  @member_end_xmi_id = member_end_xmi_id
  @owner_end = owner_end
  @owner_end_xmi_id = owner_end_xmi_id
  @definition = definition
  @options = options
  @xmi_root_model = options[:xmi_root_model]
  @id_name_mapping = options[:id_name_mapping]
end

Instance Method Details

#connectorObject



71
72
73
74
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 71

def connector
  connector = fetch_connector(@xmi_id)
  ::Lutaml::Xmi::LiquidDrops::ConnectorDrop.new(connector, @options)
end

#definitionObject



67
68
69
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 67

def definition
  @definition
end

#member_endObject



39
40
41
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 39

def member_end
  @member_end
end

#member_end_attribute_nameObject



51
52
53
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 51

def member_end_attribute_name
  @member_end_attribute_name
end

#member_end_cardinalityObject



47
48
49
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 47

def member_end_cardinality
  ::Lutaml::Xmi::LiquidDrops::CardinalityDrop.new(@member_end_cardinality)
end

#member_end_typeObject



43
44
45
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 43

def member_end_type
  @member_end_type
end

#member_end_xmi_idObject



55
56
57
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 55

def member_end_xmi_id
  @member_end_xmi_id
end

#owner_endObject



59
60
61
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 59

def owner_end
  @owner_end
end

#owner_end_xmi_idObject



63
64
65
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 63

def owner_end_xmi_id
  @owner_end_xmi_id
end

#xmi_idObject



35
36
37
# File 'lib/lutaml/xmi/liquid_drops/association_drop.rb', line 35

def xmi_id
  @xmi_id
end