Class: Lutaml::XMI::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



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

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



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

def connector
  connector = fetch_connector(@xmi_id)
  ::Lutaml::XMI::ConnectorDrop.new(connector)
end

#definitionObject



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

def definition
  @definition
end

#member_endObject



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

def member_end
  @member_end
end

#member_end_attribute_nameObject



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

def member_end_attribute_name
  @member_end_attribute_name
end

#member_end_cardinalityObject



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

def member_end_cardinality
  ::Lutaml::XMI::CardinalityDrop.new(@member_end_cardinality)
end

#member_end_typeObject



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

def member_end_type
  @member_end_type
end

#member_end_xmi_idObject



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

def member_end_xmi_id
  @member_end_xmi_id
end

#owner_endObject



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

def owner_end
  @owner_end
end

#owner_end_xmi_idObject



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

def owner_end_xmi_id
  @owner_end_xmi_id
end

#xmi_idObject



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

def xmi_id
  @xmi_id
end