lutaml-lml 0.3.1 → 0.3.2
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: c34192e0a5b3532ebb204def3335546bf9accac1852e603b2871290244d53825
|
|
4
|
+
data.tar.gz: ff0dbbc23ce3738f3e0e4e073923701bc214cdebfddcae308ae2dba18c20b345
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9de9426a07f60623c905352fee21e78c12c8352a15c924cd3a1085fec39980bc691b1ad6cab840b5dbcf89f01741cd61b2eb48c6e3acdf232295474c70dd784
|
|
7
|
+
data.tar.gz: 1d24bf1caa90301837f55a6e0b3fa68d9b5527647d2634547c89281a9f090ec54ad2836a07d1dd83ee992036d0baa10ce55ae7cf2b33a29da428f3f1bd17854c
|
|
@@ -38,7 +38,14 @@ module Lutaml
|
|
|
38
38
|
if member.key?(:definition)
|
|
39
39
|
(inner[:attributes] ||= []) << { name: 'description', type: unwrap_string(member[:definition]) }
|
|
40
40
|
elsif member.key?(:instance)
|
|
41
|
-
|
|
41
|
+
# The bare `instance { ... }` capture is the instance-body
|
|
42
|
+
# hash; it must go through instance processing so its
|
|
43
|
+
# members become attribute entries, not raw pairs.
|
|
44
|
+
bodies = member[:instance].is_a?(Hash) ? [member[:instance]] : Array(member[:instance])
|
|
45
|
+
bodies.each do |body|
|
|
46
|
+
entry = body.is_a?(Hash) ? process_instance(body) : body
|
|
47
|
+
(inner[:instances] ||= []) << entry
|
|
48
|
+
end
|
|
42
49
|
elsif member.key?(:attributes)
|
|
43
50
|
(inner[:properties] ||= []) << member[:attributes]
|
|
44
51
|
elsif member.key?(:key)
|
|
@@ -158,7 +158,19 @@ module Lutaml
|
|
|
158
158
|
# the same member shape the bare-identifier shortcut produces.
|
|
159
159
|
def expand_value_declaration(model, hash)
|
|
160
160
|
decl = hash.delete(:value_decl) or return
|
|
161
|
-
|
|
161
|
+
inner = decl.fetch(:attributes)
|
|
162
|
+
|
|
163
|
+
# Route the value block's members onto the entry: descriptions
|
|
164
|
+
# and payload pairs ride the nested attributes, instance bodies
|
|
165
|
+
# become the entry's instances (RS 3001 §Enums values carrying
|
|
166
|
+
# instances).
|
|
167
|
+
entry = { name: inner[:name] }
|
|
168
|
+
entry[:attributes] = inner[:attributes] if inner[:attributes]
|
|
169
|
+
entry[:properties] = Array(inner[:properties]).flat_map do |pair|
|
|
170
|
+
pair.is_a?(Hash) ? [pair] : Array(pair)
|
|
171
|
+
end if inner[:properties]
|
|
172
|
+
entry[:instances] = inner[:instances] if inner[:instances]
|
|
173
|
+
apply_attribute(model, :attributes, entry)
|
|
162
174
|
end
|
|
163
175
|
|
|
164
176
|
# Namespace declaration bodies arrive as keyword-line members
|
data/lib/lutaml/lml/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lutaml-lml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
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-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.8.
|
|
19
|
+
version: 0.8.114
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.8.
|
|
26
|
+
version: 0.8.114
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: parsanol
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|