Class: Greener::Formatter::SimpleText
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- Greener::Formatter::SimpleText
- Defined in:
- lib/greener/formatter/simple_text.rb
Overview
Prints violation info that includes file, line number, text of the line, and message
Instance Method Summary collapse
Methods inherited from BaseFormatter
#file_finished, #file_started, #initialize, #started
Constructor Details
This class inherits a constructor from Greener::Formatter::BaseFormatter
Instance Method Details
#finished(violations) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/greener/formatter/simple_text.rb', line 7 def finished(violations) violations.each do |violation| puts "#{violation[:file]}:#{violation[:line]}" puts "#{violation[:text_of_line]}" puts "#{' ' * (violation[:column] - 1)}^^^ #{violation[:message]}" puts "" end end |