Sha256: f9f801801a72b1fb4751fb519751142effc769929f1156e7a5ea254cc5f7c55b

Contents?: true

Size: 803 Bytes

Versions: 2

Compression:

Stored size: 803 Bytes

Contents

require "rubycritic/active_support/methods"
require "rubycritic/analysers/flay"
require "rubycritic/analysers/flog"
require "rubycritic/analysers/reek"
require "rubycritic/smell_adapters/flay"
require "rubycritic/smell_adapters/flog"
require "rubycritic/smell_adapters/reek"

module Rubycritic

  class AnalysersRunner
    include ActiveSupport

    ANALYSERS = ["Flay", "Flog", "Reek"]

    def initialize(paths)
      @paths = paths
    end

    def run
      run_analysers_and_instantiate_adapters
    end

    private

    def run_analysers_and_instantiate_adapters
      ANALYSERS.map do |analyser_name|
        analyser = constantize("Rubycritic::Analyser::#{analyser_name}").new(@paths)
        constantize("Rubycritic::SmellAdapter::#{analyser_name}").new(analyser)
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubycritic-0.0.10 lib/rubycritic/analysers_runner.rb
rubycritic-0.0.9 lib/rubycritic/analysers_runner.rb