Method: Lawyer::BrokenContract#explain_violations
- Defined in:
- lib/lawyer/broken_contract.rb
#explain_violations(violations, type) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/lawyer/broken_contract.rb', line 23 def explain_violations(violations, type) str = "" if violations.any? count = violations.count str << "\t(#{count} #{methods(count)} #{type})\n" str << violations.map(&:to_s).join("\n") str << "\n" end str end |