lawyer 0.0.4 → 0.0.5
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/lawyer/broken_contract.rb +4 -4
- data/lib/lawyer/version.rb +1 -1
- 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: d1dc57294baa5fdfe5f055c0d8e2bd268a3b6950
|
4
|
+
data.tar.gz: 8762776d0f0d62f00160641188d649ebc2a32882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a9fb3f7fa969ff86ec83441843c8753c19f32a5a5bd8d1cea7c52816022309722c1bed2f93fd0fc553ee438b00c60c6bf03c9e740d1ccf631144b00ee18895d
|
7
|
+
data.tar.gz: df03473d5f0c38035944159c0adaca6f29b01e3d6b065cb8ba95f28b4b5b2884c43449b25014d6f00e83c140147b86141b9ee657dd3095f6b7ba41c522c9e710
|
@@ -11,11 +11,11 @@ module Lawyer
|
|
11
11
|
def to_s
|
12
12
|
str = "#{@subject} does not implement <#{@contract}>\n"
|
13
13
|
str << explain_violations(@method_missing_violations, "missing")
|
14
|
-
str << "\n" if @method_missing_violations &&
|
15
|
-
(@wrong_arity_violations || @wrong_signature_violations)
|
14
|
+
str << "\n" if @method_missing_violations.any? &&
|
15
|
+
(@wrong_arity_violations/any? || @wrong_signature_violations.any?)
|
16
16
|
str << explain_violations(@wrong_arity_violations, "with the wrong arity")
|
17
|
-
str << "\n" if (@method_missing_violations || @wrong_arity_violations) &&
|
18
|
-
@wrong_signature_violations
|
17
|
+
str << "\n" if (@method_missing_violations.any? || @wrong_arity_violations.any?) &&
|
18
|
+
@wrong_signature_violations.any?
|
19
19
|
str << explain_violations(@wrong_signature_violations, "with the wrong signature")
|
20
20
|
str
|
21
21
|
end
|
data/lib/lawyer/version.rb
CHANGED