class Guard::Preek::Runner

Public Class Methods

new(files, report_type) click to toggle source
# File lib/guard/preek/runner.rb, line 6
def initialize(files, report_type)
  @files = Array(files)
  @report_type = report_type
end

Public Instance Methods

perform() click to toggle source
# File lib/guard/preek/runner.rb, line 11
def perform
  ::Preek::Examiner.new(@files, excludes, reporter: reporter).perform
end

Private Instance Methods

excludes() click to toggle source
# File lib/guard/preek/runner.rb, line 16
def excludes
  %w(IrresponsibleModule)
end
reporter() click to toggle source
# File lib/guard/preek/runner.rb, line 20
def reporter
  if @report_type == :verbose
    ::Preek::VerboseReport
  else
    ::Preek::QuietReport
  end
end