Sha256: 773c458d423e57e58dcbef880160754dd2d8a4602b05fa6cc8251551a4785750

Contents?: true

Size: 330 Bytes

Versions: 18

Compression:

Stored size: 330 Bytes

Contents

require 'set'

module Reek
  module Core
    #
    # Collects and sorts smells warnings.
    #
    class WarningCollector
      def initialize
        @warnings = Set.new
      end

      def found_smell(warning)
        @warnings.add(warning)
      end

      def warnings
        @warnings.to_a.sort
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
reek-2.2.1 lib/reek/core/warning_collector.rb
reek-2.2.0 lib/reek/core/warning_collector.rb
reek-2.1.0 lib/reek/core/warning_collector.rb
reek-2.0.4 lib/reek/core/warning_collector.rb
reek-2.0.3 lib/reek/core/warning_collector.rb
reek-2.0.2 lib/reek/core/warning_collector.rb
reek-2.0.1 lib/reek/core/warning_collector.rb
reek-2.0.0 lib/reek/core/warning_collector.rb
reek-1.6.6 lib/reek/core/warning_collector.rb
reek-1.6.5 lib/reek/core/warning_collector.rb
reek-1.6.4 lib/reek/core/warning_collector.rb
reek-1.6.3 lib/reek/core/warning_collector.rb
reek-1.6.2 lib/reek/core/warning_collector.rb
reek-1.6.1 lib/reek/core/warning_collector.rb
reek-1.6.0 lib/reek/core/warning_collector.rb
reek-1.5.1 lib/reek/core/warning_collector.rb
reek-1.5.0 lib/reek/core/warning_collector.rb
reek-1.4.0 lib/reek/core/warning_collector.rb