Class: Undercover::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/undercover/formatter.rb

Instance Method Summary collapse

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_sObject



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