Class: Undercover::Formatter
- Inherits:
-
Object
- Object
- Undercover::Formatter
- Defined in:
- lib/undercover/formatter.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ Formatter
constructor
A new instance of Formatter.
- #to_s ⇒ Object
Constructor Details
#initialize(results) ⇒ Formatter
Returns a new instance of Formatter.
5 6 7 |
# File 'lib/undercover/formatter.rb', line 5 def initialize(results) @results = results end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 |
# File 'lib/undercover/formatter.rb', line 9 def to_s return success unless @results.any? ([warnings_header] + formatted_warnings).join("\n") end |