Sha256: fc63d98bef5d98631b1ed9cd63f636980c004e86bec628049e58881d5a1c090f

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

require 'set'

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

      def found_smell(warning)
        warnings_set.add(warning)
      end

      def warnings
        warnings_set.sort
      end

      private

      attr_reader :warnings_set
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reek-3.11 lib/reek/cli/warning_collector.rb
reek-3.10.2 lib/reek/cli/warning_collector.rb