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-4.9.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.9.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.8.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.8.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.7.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.6.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.6.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.5.2 lib/rubycritic/smells_status_setter.rb
rubycritic-4.5.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.5.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.4.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.4.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.3.3 lib/rubycritic/smells_status_setter.rb
rubycritic-4.3.2 lib/rubycritic/smells_status_setter.rb
rubycritic-4.3.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.3.0 lib/rubycritic/smells_status_setter.rb
rubycritic-4.2.2 lib/rubycritic/smells_status_setter.rb
rubycritic-4.2.1 lib/rubycritic/smells_status_setter.rb
rubycritic-4.2.0 lib/rubycritic/smells_status_setter.rb
rubycritic-simplecov-4.1.1 lib/rubycritic/smells_status_setter.rb