Class: EagerEye::Reporters::Console
- Defined in:
- lib/eager_eye/reporters/console.rb
Constant Summary collapse
- COLORS =
{ red: "\e[31m", yellow: "\e[33m", green: "\e[32m", cyan: "\e[36m", reset: "\e[0m", bold: "\e[1m" }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(issues, colorize: true) ⇒ Console
constructor
A new instance of Console.
- #report ⇒ Object
Constructor Details
#initialize(issues, colorize: true) ⇒ Console
Returns a new instance of Console.
15 16 17 18 |
# File 'lib/eager_eye/reporters/console.rb', line 15 def initialize(issues, colorize: true) super(issues) @colorize = colorize end |
Instance Method Details
#report ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/eager_eye/reporters/console.rb', line 20 def report return if issues.empty? output = [] output << header output << "" issues_by_file.each do |file_path, file_issues| output << file_section(file_path, file_issues) end output << separator output << summary output.join("\n") end |