Sha256: 58bca20b6585a122dd90962c7a92da9020d789c0c4f8e481b9868d9d3a3dbeaf

Contents?: true

Size: 331 Bytes

Versions: 14

Compression:

Stored size: 331 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

14 entries across 14 versions & 1 rubygems

Version Path
reek-1.3.8 lib/reek/core/warning_collector.rb
reek-1.3.7 lib/reek/core/warning_collector.rb
reek-1.3.6 lib/reek/core/warning_collector.rb
reek-1.3.5 lib/reek/core/warning_collector.rb
reek-1.3.4 lib/reek/core/warning_collector.rb
reek-1.3.3 lib/reek/core/warning_collector.rb
reek-1.3.2 lib/reek/core/warning_collector.rb
reek-1.3.1 lib/reek/core/warning_collector.rb
reek-1.3 lib/reek/core/warning_collector.rb
reek-1.2.13 lib/reek/core/warning_collector.rb
reek-1.2.12 lib/reek/core/warning_collector.rb
reek-1.2.11 lib/reek/core/warning_collector.rb
reek-1.2.10 lib/reek/core/warning_collector.rb
reek-1.2.9 lib/reek/core/warning_collector.rb