vanilla_validator 0.4.4 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 070d811e2835a648379def4b58f250fb4459cc9d50844b6d2c71879640dc842e
4
- data.tar.gz: d676c5ec127010eb3734f1bb155dda620069f766b227653528864367f79393ba
3
+ metadata.gz: 7969cb3fe6d059e0fe8e4c881ff9183331bbccae1c2e825b7c2181e1c7892c6e
4
+ data.tar.gz: 1a0c7fd89c83a1e0c5c00d67fd2ee4bb8e0d294ce403e1d93e0ac69820ab7eb8
5
5
  SHA512:
6
- metadata.gz: bce35e7c15f9bdbd4f63cf54cc65acca8fab45e2b0edcace25bf8aaa2d51998255231c19de9b4de9f94a3edbb976ca89ce97061bcba536104554a9e4c1d8ec49
7
- data.tar.gz: 48827cb549f1bc58fa878a7c4a6ba061d102a16fd9603c2f2f8c66ee439d24cbc1218d265e289ea32b51e652c0395f15ee284694e2b69c7da7bba1bca14dfa8a
6
+ metadata.gz: 855a41e223d4e3f8e569c8c0e5d6bfbfe422d85ca451e3fe7d81321724f994ec9ad1890f2351a76a81566f1bfaa4c9d2e6d959500de52fdc3e44076a56a366b3
7
+ data.tar.gz: 787813dcaa5d797f00765f7068b084b5845b3999bb58baebff612d6d669d1d09017ad2f527b7204ffa9dee4990726491c9323599c11476acca4d7a3697c4da70
@@ -8,8 +8,14 @@ module VanillaValidator
8
8
  @errors = errors.with_indifferent_access
9
9
  end
10
10
 
11
- def valid?
11
+ alias :valid?, :success?
12
+
13
+ def success?
12
14
  errors.empty?
13
15
  end
16
+
17
+ def failed?
18
+ errors.any?
19
+ end
14
20
  end
15
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VanillaValidator
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanilla_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Farid Mohammadi