json-logic-rb 0.1.2 → 0.1.3
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 +4 -4
- data/lib/json_logic/semantics.rb +1 -7
- data/lib/json_logic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 975d191c041cd7afd3e3ab977d01944e00693ec7320e6418ae312d71afa67d7f
|
|
4
|
+
data.tar.gz: 9b871c8f3b53fbc5cf3e2dbd180a556e5815940c536da6e2c248bf8b66c9be8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eef9bc4ce561c092cc5bd7885b9f69051e4aa0712dd15e93c92f4dd32c177570472a401e7bdce65565cee4ee8b80e3ebc3afaa46a0fab91cb1f730c83f0e1a83
|
|
7
|
+
data.tar.gz: fce35e13727e2d30e827c787c5543eb13005c38a59e44abcb8a340b486d1c814d4367d297dc20826b845dd7da98c193b2fa1bf0a521d6aa70bff2847da51eb6c
|
data/lib/json_logic/semantics.rb
CHANGED
|
@@ -86,7 +86,7 @@ module JsonLogic
|
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
[String, Integer, Float].each do |klass|
|
|
89
|
+
[String, Integer, Float, NilClass, Array, TrueClass, FalseClass].each do |klass|
|
|
90
90
|
refine klass do
|
|
91
91
|
def ==(other) = JsonLogic::Semantics.eq(self, other)
|
|
92
92
|
def >(other) = (c = JsonLogic::Semantics.cmp(self, other)) && c == 1
|
|
@@ -95,11 +95,5 @@ module JsonLogic
|
|
|
95
95
|
def <=(other) = (c = JsonLogic::Semantics.cmp(self, other)) && (c == -1 || c == 0)
|
|
96
96
|
end
|
|
97
97
|
end
|
|
98
|
-
|
|
99
|
-
[Array, TrueClass, FalseClass, NilClass].each do |klass|
|
|
100
|
-
refine klass do
|
|
101
|
-
def ==(other) = JsonLogic::Semantics.eq(self, other)
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
98
|
end
|
|
105
99
|
end
|
data/lib/json_logic/version.rb
CHANGED