Sha256: 8f21ac478b1aaf0ecb02a41c0f0ccc491de0b71dee234b004438a4539228c5dc

Contents?: true

Size: 409 Bytes

Versions: 1

Compression:

Stored size: 409 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
rubycritic-2.9.3 lib/rubycritic/smells_status_setter.rb