Class: Lutaml::Xmi::LiquidDrops::EnumDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::Xmi::LiquidDrops::EnumDrop
show all
- Includes:
- Parsers::XmiBase
- Defined in:
- lib/lutaml/xmi/liquid_drops/enum_drop.rb
Instance Method Summary
collapse
included, #set_xmi_model, #xmi_index
Constructor Details
#initialize(model, options = {}) ⇒ EnumDrop
rubocop:disable Lint/MissingSuper
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 9
def initialize(model, options = {}) @model = model
@options = options
@xmi_root_model = options[:xmi_root_model]
@id_name_mapping = options[:id_name_mapping]
@owned_literals = model&.owned_literal&.select do |owned_literal|
owned_literal.type? "uml:EnumerationLiteral"
end
end
|
Instance Method Details
#definition ⇒ Object
35
36
37
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 35
def definition
doc_node_attribute_value(@model.id, "documentation")
end
|
#name ⇒ Object
24
25
26
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 24
def name
@model.name
end
|
#stereotype ⇒ Object
39
40
41
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 39
def stereotype
doc_node_attribute_value(@model.id, "stereotype")
end
|
#subtype_of ⇒ Object
51
52
53
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 51
def subtype_of
find_subtype_of_from_owned_attribute_type(@model.id)
end
|
#upper_packaged_element ⇒ Object
Returns name of the upper packaged element.
44
45
46
47
48
49
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 44
def upper_packaged_element
if @options[:with_gen]
e = find_upper_level_packaged_element(@model.id)
e&.name
end
end
|
#xmi_id ⇒ Object
20
21
22
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 20
def xmi_id
@model.id
end
|