Class: Lutaml::XMI::EnumDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::XMI::EnumDrop
show all
- Includes:
- Parsers::XMIBase
- Defined in:
- lib/lutaml/xmi/liquid_drops/enum_drop.rb
Instance Method Summary
collapse
#get_guidance, included, #set_xmi_model
Constructor Details
#initialize(model, options = {}) ⇒ EnumDrop
rubocop:disable Lint/MissingSuper
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 8
def initialize(model, options = {}) @model = model
@options = options
@xmi_root_model = options[:xmi_root_model]
@xmi_cache = options[:xmi_cache]
@owned_literals = model&.owned_literal&.select do |owned_literal|
owned_literal.type? "uml:EnumerationLiteral"
end
end
|
Instance Method Details
#definition ⇒ Object
33
34
35
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 33
def definition
doc_node_attribute_value(@model.id, "documentation")
end
|
#name ⇒ Object
23
24
25
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 23
def name
@model.name
end
|
#stereotype ⇒ Object
37
38
39
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 37
def stereotype
doc_node_attribute_value(@model.id, "stereotype")
end
|
#values ⇒ Object
27
28
29
30
31
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 27
def values
@owned_literals.map do |owned_literal|
::Lutaml::XMI::EnumOwnedLiteralDrop.new(owned_literal, @options)
end
end
|
#xmi_id ⇒ Object
19
20
21
|
# File 'lib/lutaml/xmi/liquid_drops/enum_drop.rb', line 19
def xmi_id
@model.id
end
|