Class: Preek::SmellReporter

Inherits:
Thor::Shell::Color
  • Object
show all
Defined in:
lib/preek/smell_reporter.rb

Overview

Here we report the smells in a nice fashion

Instance Method Summary collapse

Constructor Details

#initialize(smelly_files, not_files) ⇒ SmellReporter

Returns a new instance of SmellReporter.



5
6
7
8
9
# File 'lib/preek/smell_reporter.rb', line 5

def initialize(smelly_files, not_files)
  @smelly_files = smelly_files
  @not_files = not_files
  @padding = 0
end

Instance Method Details



11
12
13
14
15
16
17
18
# File 'lib/preek/smell_reporter.rb', line 11

def print_smells
  if success?
    say_status 'success!', 'No smells detected.'
  else
    print_each_smell
  end
  print_not_files
end