Sha256: db56829ba5c3698539af2288cec8468c70ed9935c14ea2c04724402b151b0573

Contents?: true

Size: 440 Bytes

Versions: 33

Compression:

Stored size: 440 Bytes

Contents

# frozen_string_literal: true

module RubyCritic
  module SmellsStatusSetter
    def self.set(smells_before, smells_now)
      old_smells = smells_now & smells_before
      set_status(old_smells, :old)
      new_smells = smells_now - smells_before
      set_status(new_smells, :new)
    end

    def self.set_status(smells, status)
      smells.each { |smell| smell.status = status }
    end

    private_class_method :set_status
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
rubycritic-simplecov-4.1.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.1.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.0.2 lib/rubycritic/smells_status_setter.rb
rubycritic-4.0.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.0.0 lib/rubycritic/smells_status_setter.rb
rubycritic-3.5.2 lib/rubycritic/smells_status_setter.rb
rubycritic-3.5.1 lib/rubycritic/smells_status_setter.rb
rubycritic-3.5.0 lib/rubycritic/smells_status_setter.rb
rubycritic-3.4.0 lib/rubycritic/smells_status_setter.rb
rubycritic-3.3.0 lib/rubycritic/smells_status_setter.rb
rubycritic-3.2.3 lib/rubycritic/smells_status_setter.rb
rubycritic-3.2.2 lib/rubycritic/smells_status_setter.rb
rubycritic-3.2.1 lib/rubycritic/smells_status_setter.rb