class Rubycritic::SmellsStatusSetter

def initialize(smelly_pathnames_before, smelly_pathnames_now)

def initialize(smelly_pathnames_before, smelly_pathnames_now)
  @smelly_pathnames_before = smelly_pathnames_before
  @smelly_pathnames_now = smelly_pathnames_now
end

def set_status(smells, status)

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

def smelly_pathnames

def smelly_pathnames
  @smelly_pathnames_now.each do |pathname, smells_now|
    smells_before = @smelly_pathnames_before[pathname] || []
    old_smells = smells_now & smells_before
    set_status(old_smells, :old)
    new_smells = smells_now - smells_before
    set_status(new_smells, :new)
  end
  @smelly_pathnames_now
end