Sha256: 43b348356cd78baa691b7662dd750c23df4fe6dadb8d57fd9d1b31dd0fe029df

Contents?: true

Size: 424 Bytes

Versions: 10

Compression:

Stored size: 424 Bytes

Contents

require 'private_attr/everywhere'
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

      private_attr_reader :warnings_set
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
reek-3.10.1 lib/reek/cli/warning_collector.rb
reek-3.10.0 lib/reek/cli/warning_collector.rb
reek-3.9.1 lib/reek/cli/warning_collector.rb
reek-3.9.0 lib/reek/cli/warning_collector.rb
reek-3.8.3 lib/reek/cli/warning_collector.rb
reek-3.8.2 lib/reek/cli/warning_collector.rb
reek-3.8.1 lib/reek/cli/warning_collector.rb
reek-3.8.0 lib/reek/cli/warning_collector.rb
reek-3.7.1 lib/reek/cli/warning_collector.rb
reek-3.7.0 lib/reek/cli/warning_collector.rb