lawyer 0.0.4 → 0.0.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
  SHA1:
3
- metadata.gz: 9bbaad434f4367f45db1dfb150377141cd7169fc
4
- data.tar.gz: 73aae6e266d7ab421fcab38a07588fdc0df7d050
3
+ metadata.gz: d1dc57294baa5fdfe5f055c0d8e2bd268a3b6950
4
+ data.tar.gz: 8762776d0f0d62f00160641188d649ebc2a32882
5
5
  SHA512:
6
- metadata.gz: cbf01c04377ea161d374f38b44c44ab84d637ae69b28fdf11039beb5fb0c88f3b69a157fb7fb786eb4b894c2981a78d2d5b4cc0da04934775f8e3594ea7575bb
7
- data.tar.gz: 6fc641024fe626b6d79bd9d7a829a6c2ad7fe8bcb7f6e1afced857ab288caa8f42a1b048fc5230c229411e535654eff0cea788f326de8b2ec1cea8bb942dc563
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
@@ -1,3 +1,3 @@
1
1
  module Lawyer
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lawyer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Cinnamond