Class: JRuby::Lint::Reporters::ANSIColor

Inherits:
Text
  • Object
show all
Includes:
Term::ANSIColor
Defined in:
lib/jruby/lint/reporters/text.rb

Instance Method Summary collapse

Methods inherited from Text

#initialize, #report

Constructor Details

This class inherits a constructor from JRuby::Lint::Reporters::Text

Instance Method Details

#puts(finding) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/jruby/lint/reporters/text.rb', line 22

def puts(finding)
  msg = if finding.error?
          red(finding.to_s)
        elsif finding.warning?
          yellow(finding.to_s)
        else
          finding.to_s
        end
  @output.puts msg
end