class Preek::VerboseReport
Public Class Methods
new(examiner, output)
click to toggle source
# File lib/preek/report.rb, line 10 def initialize(examiner, output) @examiner, @output = examiner, output end
verbose?()
click to toggle source
# File lib/preek/report.rb, line 6 def self.verbose? true end
Public Instance Methods
report()
click to toggle source
# File lib/preek/report.rb, line 14 def report print_header if @examiner.smelly? report_smells else report_success end end
Private Instance Methods
print_header()
click to toggle source
# File lib/preek/report.rb, line 25 def print_header @output.print_line @output.blue :file, "#{@examiner.description}\n" end
print_klass_smells(smells)
click to toggle source
# File lib/preek/report.rb, line 46 def print_klass_smells(smells) smells.each {|smell| @output.status nil, smell } end
print_smell()
click to toggle source
# File lib/preek/report.rb, line 42 def print_smell lambda {|smell| @output.status nil, smell } end
report_smells()
click to toggle source
# File lib/preek/report.rb, line 34 def report_smells smell_file.klasses do |klass| @output.green :class, klass.name @output.red :smells, '' klass.smells.each &print_smell end end
report_success()
click to toggle source
# File lib/preek/report.rb, line 50 def report_success @output.green :success, "No smells detected.\n" end
smell_file()
click to toggle source
# File lib/preek/report.rb, line 30 def smell_file SmellFile.new(@examiner) end