code-ruby 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code/type/hash.rb +5 -3
- data/lib/code/type/maybe.rb +3 -1
- data/lib/code/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: 51e07a3736fa390271534aa21eb24fb5bdd5a149a06ae2b3aa3865fe3ed411d3
|
4
|
+
data.tar.gz: 5b2be326d1fb68f97a6f4729aab8e639241e45496afcff0f503db104b505e111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0024632b4b4f724c1c2726cf25896cb7a09c231d689bf22359c5cf2206dbddb1c9a298ee0e9b4127c7da7a3eb860952b618477def968446048639b6e9ee36ff0
|
7
|
+
data.tar.gz: 442576080a62326683fec644a9c6b5a62d0163a6d6488c7e9b85c85fd60d0b30a45fc1be99595f0f065e8dd8899bfeb853593a5e1b36fa838277f790ecff76d7
|
data/lib/code/type/hash.rb
CHANGED
@@ -14,9 +14,11 @@ class Code
|
|
14
14
|
|
15
15
|
argument = argument.raw
|
16
16
|
(argument.keys + hash.keys).uniq.all? do |key|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
if hash[key]
|
18
|
+
valid_for?(expected: hash[key], actual: argument[key] || Object::Nothing.new)
|
19
|
+
else
|
20
|
+
false
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
data/lib/code/type/maybe.rb
CHANGED
data/lib/code/version.rb
CHANGED