lib/filename_cleaner/cli.rb
def compare_and_rename(old_name, new_name, commit)
      if new_name != old_name
        puts "FYI: old name: #{old_name}"
        puts "FYI: new name: #{new_name}"
        # Don't override the file if it is already exist!
        unless File.exist?(new_name) || !commit
          FileUtils.mv old_name, new_name
        end
      else
        puts "FYI: same file #{old_name}"
      end
    end
def compare_and_rename(old_name, new_name, commit)
      if new_name != old_name
        puts "FYI: old name: #{old_name}"
        puts "FYI: new name: #{new_name}"
        # Don't override the file if it is already exist!
        unless File.exist?(new_name) || !commit
          FileUtils.mv old_name, new_name
        end
      else
        puts "FYI: same file #{old_name}"
      end
    end
rubocop:enable LineLength