object_attorney 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/object_attorney/errors.rb +2 -0
- data/lib/object_attorney/helpers.rb +0 -2
- data/lib/object_attorney/version.rb +1 -1
- data/lib/object_attorney.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3b6bf8836f5450f7ab3396c271972faf4d091f
|
4
|
+
data.tar.gz: 2aa5a1a9570fd4a8f0a7af07a90672efaa5a0a0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 917dcb4494af280c9ca80bd2ef1645dd575ecef23775a6e1d991efd6854776777f33de2d437a0835ae4f7e29e322970651e6de300d083140b2f87839a29fa439
|
7
|
+
data.tar.gz: 9364ff0e8d4a81a6f04d404a632b294db9df1706012ef1f5c7daaed8397b928cf74a18f00c6acd30d9b3d312092422b10ac8b1b5235c11200a63bcfe75438026
|
data/lib/object_attorney.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'active_model'
|
2
|
+
require 'object_attorney/errors'
|
2
3
|
require 'object_attorney/version'
|
3
4
|
require 'object_attorney/helpers'
|
4
5
|
require 'object_attorney/class_methods'
|
@@ -10,6 +11,8 @@ module ObjectAttorney
|
|
10
11
|
end
|
11
12
|
|
12
13
|
def defendant_is_innocent?
|
14
|
+
raise Errors::NoDefendantToDefendError if defendant_options.empty?
|
15
|
+
|
13
16
|
proven_innocent = defendants.map do |defendant|
|
14
17
|
innocent_of_all_accusations?(defendant)
|
15
18
|
end.all?
|