Sha256: a5917a4be02d55b09c9dcaa8c1015ea788bba95a499fac257c3fcaef27f7ece0

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

module Reek
  class DetectorStack

    def initialize(default_detector)
      @detectors = [default_detector]
    end

    def push(config)
      det = @detectors[0].copy
      det.configure_with(config)
      @detectors.each {|smell| smell.be_masked}
      @detectors << det
    end

    def listen_to(hooks)
      @detectors.each { |smell| smell.listen_to(hooks) }
    end

    def report_on(report)
      @detectors.each { |smell| smell.report_on(report) }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kevinrutherford-reek-1.1.3.10 lib/reek/detector_stack.rb
kevinrutherford-reek-1.1.3.8 lib/reek/detector_stack.rb
kevinrutherford-reek-1.1.3.9 lib/reek/detector_stack.rb