lutaml 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lutaml/lutaml_path/document_wrapper.rb +7 -3
- data/lib/lutaml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baef07d33c5aa163875a731b0dcbcf9de336d0bcb6c1066a17d74210e8d26d3a
|
4
|
+
data.tar.gz: b3b000fe77946b863f5ee539319ef777ea14b20de6c607091dcf84c059ccd732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6319856a0ef1833a797e5d6aba050a83d2d145e16d508f5a9c84cfe9484b958949a5c6ca906a373bbf2786c486b7e684237c49ee907ce21caa5e58c83f0d39a9
|
7
|
+
data.tar.gz: b96dedf55a1689f9213ab9d3add19ceae2c3110953721a99ddf74913b572bfff28406635a6d6b01b33431a8fbc3131971b2d6058aacabce132b7b3b8d1068913
|
@@ -8,6 +8,10 @@ module Lutaml
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def to_liquid
|
11
|
+
serialized_document
|
12
|
+
end
|
13
|
+
|
14
|
+
def serialized_document
|
11
15
|
@serialized_document ||= serialize_document(@original_document)
|
12
16
|
end
|
13
17
|
|
@@ -25,9 +29,9 @@ module Lutaml
|
|
25
29
|
serialize_to_hash(attr_value)
|
26
30
|
end
|
27
31
|
|
32
|
+
BASE_OBJECTS = [String, Integer, Float, FalseClass, TrueClass, Symbol, NilClass, Hash]
|
28
33
|
def serialize_to_hash(object)
|
29
|
-
return object if
|
30
|
-
Symbol, NilClass, Hash].include?(object.class)
|
34
|
+
return object if BASE_OBJECTS.include?(object.class)
|
31
35
|
|
32
36
|
object.instance_variables.each_with_object({}) do |var, res|
|
33
37
|
variable = object.instance_variable_get(var)
|
@@ -35,7 +39,7 @@ module Lutaml
|
|
35
39
|
variable.map do |n|
|
36
40
|
serialize_to_hash(n)
|
37
41
|
end
|
38
|
-
elsif
|
42
|
+
elsif BASE_OBJECTS.include?(variable.class) || var == :@parent
|
39
43
|
variable
|
40
44
|
else
|
41
45
|
serialize_to_hash(variable)
|
data/lib/lutaml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expressir
|