Sha256: 3722e44a82c40f421b599ded16e6988a527a38fe4800cc9281f390bed3a33127

Contents?: true

Size: 348 Bytes

Versions: 7

Compression:

Stored size: 348 Bytes

Contents

require 'set'

module Reek
  module CLI
    #
    # Collects and sorts smells warnings.
    #
    # @api private
    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

7 entries across 7 versions & 1 rubygems

Version Path
reek-3.2.1 lib/reek/cli/warning_collector.rb
reek-3.1 lib/reek/cli/warning_collector.rb
reek-3.0.4 lib/reek/cli/warning_collector.rb
reek-3.0.3 lib/reek/cli/warning_collector.rb
reek-3.0.2 lib/reek/cli/warning_collector.rb
reek-3.0.1 lib/reek/cli/warning_collector.rb
reek-3.0.0 lib/reek/cli/warning_collector.rb