Class: RuboCop::Formatter::SimpleTextFormatter::Report
- Inherits:
-
Object
- Object
- RuboCop::Formatter::SimpleTextFormatter::Report
- Includes:
- Colorizable, TextUtil
- Defined in:
- lib/rubocop/formatter/simple_text_formatter.rb
Overview
A helper class for building the report summary text.
Instance Method Summary collapse
-
#initialize(file_count, offense_count, correction_count, rainbow) ⇒ Report
constructor
A new instance of Report.
- #summary ⇒ Object
Methods included from Colorizable
Methods included from TextUtil
Constructor Details
#initialize(file_count, offense_count, correction_count, rainbow) ⇒ Report
Returns a new instance of Report.
95 96 97 98 99 100 |
# File 'lib/rubocop/formatter/simple_text_formatter.rb', line 95 def initialize(file_count, offense_count, correction_count, rainbow) @file_count = file_count @offense_count = offense_count @correction_count = correction_count @rainbow = rainbow end |
Instance Method Details
#summary ⇒ Object
102 103 104 105 106 107 108 |
# File 'lib/rubocop/formatter/simple_text_formatter.rb', line 102 def summary if @correction_count > 0 "#{files} inspected, #{offenses} detected, #{corrections} corrected" else "#{files} inspected, #{offenses} detected" end end |