class Reek::Report::SimpleWarningFormatter
Basic formatter that just shows a simple message for each warning, prepended with the result of the passed-in location formatter.
Attributes
Public Class Methods
Source
# File lib/reek/report/simple_warning_formatter.rb, line 10 def initialize(location_formatter: BlankLocationFormatter) @location_formatter = location_formatter end
Public Instance Methods
Source
# File lib/reek/report/simple_warning_formatter.rb, line 14 def format(warning) "#{location_formatter.format(warning)}#{warning.base_message}" end
Source
# File lib/reek/report/simple_warning_formatter.rb, line 18 def format_list(warnings) warnings.map { |warning| " #{format(warning)}" }.join("\n") end