vanilla_validator 0.4.4 → 0.4.5

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: 6acc3bccec31e8a63a44221844eaea1b0d14643d91c486b781de31a9f46aab67
4
+ data.tar.gz: c2c5c531c62d3bf7a3e5ab413d4dd4ec49a7f0279f9a1a276ec4ce0f1cde7e55
5
5
  SHA512:
6
- metadata.gz: bce35e7c15f9bdbd4f63cf54cc65acca8fab45e2b0edcace25bf8aaa2d51998255231c19de9b4de9f94a3edbb976ca89ce97061bcba536104554a9e4c1d8ec49
7
- data.tar.gz: 48827cb549f1bc58fa878a7c4a6ba061d102a16fd9603c2f2f8c66ee439d24cbc1218d265e289ea32b51e652c0395f15ee284694e2b69c7da7bba1bca14dfa8a
6
+ metadata.gz: 3fb39d1feba4589feb5e3d0a0cf178d437e108c93a8c791bea9fe11550457dbfe37528ed8784be9fe53ec73deed2409132f471dfe1100f724d699404f54b20d5
7
+ data.tar.gz: ecaf7c8b7c0d8803e0115dd5a5565c378839e8e6d7bf794f1e2d9927cdf4bdcd00ddc781b1d487d1a3a02345d4cdac47b60133a1ff3b3ada082f651e68127998
@@ -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.5"
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.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Farid Mohammadi