Class: Rubocop::Report::PlainText
- Defined in:
- lib/rubocop/report/plain_text.rb
Overview
Plain text report, suitable for display in terminals.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Report
Instance Method Summary collapse
- #display(stream = $stdout) ⇒ Object
-
#generate ⇒ Object
Generates a string representation of the report.
Methods inherited from Report
#<<, #empty?, #entries, #initialize
Constructor Details
This class inherits a constructor from Rubocop::Report::Report
Instance Method Details
#display(stream = $stdout) ⇒ Object
13 14 15 |
# File 'lib/rubocop/report/plain_text.rb', line 13 def display(stream = $stdout) stream.puts generate end |
#generate ⇒ Object
Generates a string representation of the report
8 9 10 11 |
# File 'lib/rubocop/report/plain_text.rb', line 8 def generate report = "== #{filename} ==\n".color(:yellow) report << entries.join("\n") end |