Class: Preek::Examiner

Inherits:
Object
  • Object
show all
Defined in:
lib/preek/examiner.rb

Instance Method Summary collapse

Constructor Details

#initialize(files, excludes = [], options = {}) ⇒ Examiner

Returns a new instance of Examiner.



5
6
7
8
9
10
11
12
# File 'lib/preek/examiner.rb', line 5

def initialize(files, excludes = [], options = {})
  @files = files
  @excludes = excludes
  @reporter = options[:reporter] || VerboseReport
  output_class = options[:output] || Output
  @output = output_class.new
  @total_smells = 0
end

Instance Method Details

#performObject



14
15
16
17
18
19
# File 'lib/preek/examiner.rb', line 14

def perform
  examine_and_report
  report_totals if totals_to_report?
  @output.print_line
  report_non_existing if non_existing_files?
end