validy 1.1.5 → 1.1.5.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 +4 -4
- data/lib/validy.rb +3 -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: 8469d3a208d0f04205302c18b3c3b4896cefdf59beff7f30370979bf4fb6c1c0
|
|
4
|
+
data.tar.gz: 1c246fc93a1907d520bf6a2d45383c188349015b6f035a76ed588194353907e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd5283866a080ab683297dc58f6eadc091da7faae805ab15156f23e1e56d0864e598b6deb132b23689281f47c1393f2dcfc5bfaae0a4833ee2287b8d0213d702
|
|
7
|
+
data.tar.gz: 5d18a0a06bea3b99a6c0c74242c05f202b3c47ec0cfefda219ae018575e4b0e1555c24737190ad3af8702384ccc10a7e1d019c5af54dbf66fd2f44b530a5123c
|
data/lib/validy.rb
CHANGED
|
@@ -143,7 +143,9 @@ module Validy
|
|
|
143
143
|
return self unless valid?
|
|
144
144
|
|
|
145
145
|
@evaluating_attribute_value = instance_variable_get("@#{attribute}")
|
|
146
|
-
|
|
146
|
+
unless @evaluating_attribute_value.instance_of?(FalseClass)
|
|
147
|
+
validate_condition(@evaluating_attribute_value, error || "#{attribute} required!", &block)
|
|
148
|
+
end
|
|
147
149
|
self
|
|
148
150
|
end
|
|
149
151
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: validy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.5
|
|
4
|
+
version: 1.1.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oleg Saltykov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|