<commit_before>module CloudFilesTransfer
  class Transfer

    attr_accessor :origin, :destination, :path

    def initialize(origin, destination, path, args={})
      @origin = origin
      @destination = destination
      @path = path
    end

    def self.copy!(origin, destination, path, args={})
      return skip_message(path) if destination.object_exists?(path)
      new(origin, destination, path, args).copy
    end

    def copy
      retries = 0
      puts "Saving #{path}"
      begin
        origin_object = origin.object(path)
        desintation_object = destination.create_object(path)
        desintation_object.write(origin_object.data)
      rescue Exception
        retries = retries + 1
        unless retries > 5
          puts "#{path} failed. Retry"
          retry
        else
          puts "#{path} failed."
        end
      end
    end

    private

    def skip_message path
      puts "#{path} skipped."
    end

  end
end<commit_msg>Fixes missing method<commit_after>module CloudFilesTransfer
  class Transfer

    attr_accessor :origin, :destination, :path

    def initialize(origin, destination, path, args={})
      @origin = origin
      @destination = destination
      @path = path
    end

    def self.copy!(origin, destination, path, args={})
      return puts("#{path} skipped.") if destination.object_exists?(path)
      new(origin, destination, path, args).copy
    end

    def copy
      retries = 0
      puts "Saving #{path}"
      begin
        origin_object = origin.object(path)
        desintation_object = destination.create_object(path)
        desintation_object.write(origin_object.data)
      rescue Exception
        retries = retries + 1
        unless retries > 5
          puts "#{path} failed. Retry"
          retry
        else
          puts "#{path} failed."
        end
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.08891269416175683, 'fraction_numerical': 0.0032137118371719335, 'mean_word_length': 2.265734265734266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7132903', 'n_tokens_mistral': 531, 'n_tokens_neox': 523, 'n_words': 148}