util-params 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/util/params/params.rb +4 -1
- data/lib/util/params/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: 4bbfd6fcaaf880b55406350dc06479b44c9baff72e3e650727e6aebc36bbf4ac
|
4
|
+
data.tar.gz: f7f8435b2333617454ae7c8726fbc308dca5607e539c639e8eb9c30e1aea1a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e61ae2fd083797359649d85983936fa19d2cdd56022264f6d36c8a8d6782e077e73541b7f2e3421e5dcc7e88800b3a3760ffcbc87bc1ef3ba4c3e8d6c53b5fe
|
7
|
+
data.tar.gz: 74f29c417a7da06ce6b7a4f73bdadefee685026793322383afe7e66d810942445114c7ed308f301a65c0da9c1e5d1bd5b0baa38be47cc18e74093591ea712235
|
data/lib/util/params/params.rb
CHANGED
@@ -26,7 +26,10 @@ module Util
|
|
26
26
|
key = options[:key]
|
27
27
|
val = _load_val params.permit!.to_h, key, options[:default], options[:require]
|
28
28
|
|
29
|
-
|
29
|
+
unless options[:null]
|
30
|
+
_push_error "*[#{key.to_s}] == nil" if val.nil?
|
31
|
+
end
|
32
|
+
|
30
33
|
return nil if val.nil?
|
31
34
|
|
32
35
|
_validate key, options[:type], val, options
|
data/lib/util/params/version.rb
CHANGED