ea 0.6.87 → 0.6.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fbe22f7a331d0a4785835dc942b2c14a1a50d582494d284310b155deb14e95e8
|
|
4
|
+
data.tar.gz: 31bca9c2e54461cd2da07d75f92d3db79c0fc610a7ab9eb3a9273cfd9ade56ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48f42070549a8b34e6cf125431675092834b990052e669f56e00ad291b16cf166b7c302d90be870cf440a80f14a5264a6c22191d8aeff15fa91320c10989fc24
|
|
7
|
+
data.tar.gz: b83c90fb2b516341ac1ca1621482f9ae1438e339a242170d5cccb6144f6e15eb37188499dbe102697d22843794a349d25980236ef5302abff96d0da7bd8f2efb
|
data/lib/ea/version.rb
CHANGED
|
@@ -4,10 +4,11 @@ module Ea
|
|
|
4
4
|
module Xmi
|
|
5
5
|
module LiquidDrops
|
|
6
6
|
class AttributeDrop < Liquid::Drop
|
|
7
|
-
def initialize(model, options = {}) # rubocop:disable Lint/MissingSuper
|
|
7
|
+
def initialize(model, options = {}, guidance = nil) # rubocop:disable Lint/MissingSuper
|
|
8
8
|
@model = model
|
|
9
9
|
@options = options
|
|
10
10
|
@lookup = options[:lookup]
|
|
11
|
+
@guidance = guidance
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def id
|
|
@@ -43,7 +44,7 @@ module Ea
|
|
|
43
44
|
|
|
44
45
|
if defn.nil? || defn.empty?
|
|
45
46
|
defn = @lookup.lookup_connector_def_by_associationclass(
|
|
46
|
-
@model.association
|
|
47
|
+
@model.association
|
|
47
48
|
)
|
|
48
49
|
end
|
|
49
50
|
|
|
@@ -51,29 +52,48 @@ module Ea
|
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
def association
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return unless @options[:with_assoc] && @model.association
|
|
56
|
+
|
|
57
|
+
@model.association
|
|
57
58
|
end
|
|
58
59
|
|
|
59
60
|
def association_connector
|
|
60
61
|
return unless @model.association
|
|
61
62
|
|
|
62
63
|
connector = @lookup.fetch_connector(@model.association)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
return unless connector
|
|
65
|
+
|
|
66
|
+
::Ea::Xmi::LiquidDrops::ConnectorDrop.new(connector, @options)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
69
|
def type_ns
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
return unless @options[:with_assoc] && @model.association
|
|
71
|
+
|
|
72
|
+
@model.type_ns
|
|
72
73
|
end
|
|
73
74
|
|
|
74
75
|
def stereotype
|
|
75
76
|
@lookup.doc_node_attribute_value(@model.xmi_id, "stereotype")
|
|
76
77
|
end
|
|
78
|
+
|
|
79
|
+
def used?
|
|
80
|
+
if @guidance
|
|
81
|
+
col_name = name
|
|
82
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
83
|
+
return attr["used"].to_s if attr
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
"true"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def guidance
|
|
90
|
+
return unless @guidance
|
|
91
|
+
|
|
92
|
+
col_name = "#{name_ns}:#{name}"
|
|
93
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
94
|
+
|
|
95
|
+
attr["guidance"] if attr
|
|
96
|
+
end
|
|
77
97
|
end
|
|
78
98
|
end
|
|
79
99
|
end
|
|
@@ -49,8 +49,8 @@ module Ea
|
|
|
49
49
|
def attributes
|
|
50
50
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
51
51
|
if @options[:with_assoc] || owned_attr.association.nil?
|
|
52
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
53
|
-
|
|
52
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
53
|
+
.new(owned_attr, @options, @data_type_guidance)
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
end
|
|
@@ -87,16 +87,17 @@ module Ea
|
|
|
87
87
|
|
|
88
88
|
def owned_attributes
|
|
89
89
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
90
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
90
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
91
|
+
.new(owned_attr, @options, @data_type_guidance)
|
|
91
92
|
end
|
|
92
93
|
end
|
|
93
94
|
|
|
94
95
|
def generalization
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
return unless @model.generalization
|
|
97
|
+
|
|
98
|
+
::Ea::Xmi::LiquidDrops::GeneralizationDrop.new(
|
|
99
|
+
@model.generalization, @data_type_guidance, @options
|
|
100
|
+
)
|
|
100
101
|
end
|
|
101
102
|
|
|
102
103
|
def has_guidance?
|
|
@@ -74,12 +74,12 @@ module Ea
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def guidance
|
|
77
|
-
|
|
78
|
-
col_name = "#{name_ns}:#{name}"
|
|
79
|
-
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
77
|
+
return unless @guidance
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
col_name = "#{name_ns}:#{name}"
|
|
80
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
81
|
+
|
|
82
|
+
attr["guidance"] if attr
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.88
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|