<commit_before>module ShipFosdick
  class Downloader

    def self.download
      [].tap do |returned_content|
        objects.each do |object|
          next unless object.key.downcase.include?('ship')
          next unless object.key.downcase.include?('.txt')
          returned_content << object.key
        end
      end
    end

    private
    def self.objects
      prefix = ShipFosdick.configuration.folder_prefix
      return ShipFosdick.bucket.objects(prefix: prefix) if prefix
      ShipFosdick.bucket.objects
    end
  end
end<commit_msg>make Downloader a module and extend self<commit_after>module ShipFosdick
  module Downloader
    extend self

    def download
      [].tap do |returned_content|
        objects.each do |object|
          next unless object.key.downcase.include?('ship')
          next unless object.key.downcase.include?('.txt')
          returned_content << object.key
        end
      end
    end

    private
    def objects
      prefix = ShipFosdick.configuration.folder_prefix
      return ShipFosdick.bucket.objects(prefix: prefix) if prefix
      ShipFosdick.bucket.objects
    end
  end
end
{'fraction_non_alphanumeric': 0.07407407407407407, 'fraction_numerical': 0.0, 'mean_word_length': 2.470948012232416, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4415547', 'n_tokens_mistral': 330, 'n_tokens_neox': 327, 'n_words': 81}