Sha256: 9fafa6610692964dd9371aa9e40c3c03183d0543b2e334a368619cb955183f46

Contents?: true

Size: 412 Bytes

Versions: 17

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true
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

17 entries across 17 versions & 1 rubygems

Version Path
reek-4.4.0 lib/reek/cli/warning_collector.rb
reek-4.3.0 lib/reek/cli/warning_collector.rb
reek-4.2.5 lib/reek/cli/warning_collector.rb
reek-4.2.4 lib/reek/cli/warning_collector.rb
reek-4.2.3 lib/reek/cli/warning_collector.rb
reek-4.2.2 lib/reek/cli/warning_collector.rb
reek-4.2.1 lib/reek/cli/warning_collector.rb
reek-4.2.0 lib/reek/cli/warning_collector.rb
reek-4.1.1 lib/reek/cli/warning_collector.rb
reek-4.1.0 lib/reek/cli/warning_collector.rb
reek-4.0.5 lib/reek/cli/warning_collector.rb
reek-4.0.4 lib/reek/cli/warning_collector.rb
reek-4.0.3 lib/reek/cli/warning_collector.rb
reek-4.0.2 lib/reek/cli/warning_collector.rb
reek-4.0.1 lib/reek/cli/warning_collector.rb
reek-4.0.0 lib/reek/cli/warning_collector.rb
reek-4.0.0.pre1 lib/reek/cli/warning_collector.rb