<commit_before>module Harvester
  module API
    class Clients < Base

      def by_name(client_name)
        all_clients = @harvest.clients.all

        # Returns only matching project
        clients = all_clients.select{ |c| c.name.downcase.include?(client_name.downcase) }

        make_clients(clients)
      end

      def by_id(client_id)
        client_obj = @harvest.clients.find(client_id)
        Models::Client.new(client_obj,@harvest)
      end

      def make_clients(harvest_clients)
        clients = []
        harvest_clients.each do |p|
          clients << Models::Client.new(p,@harvest)
        end
        return clients
      end
      private :make_clients

    end # Clients
  end # API
end # Harvester
<commit_msg>Added all to load API::Clients<commit_after>module Harvester
  module API
    class Clients < Base


      # Return all projects
      def all()
        make_clients(@harvest.clients.all)
      end

      # Returns only matching project
      def by_name(client_name)
        clients = @harvest.clients.all.select{ |c| c.name.downcase.include?(client_name.downcase) }

        make_clients(clients)
      end

      def by_id(client_id)
        client_obj = @harvest.clients.find(client_id)
        Models::Client.new(client_obj,@harvest)
      end

      def make_clients(harvest_clients)
        clients = []
        harvest_clients.each do |p|
          clients << Models::Client.new(p,@harvest)
        end
        return clients
      end
      private :make_clients

    end # Clients
  end # API
end # Harvester

{'fraction_non_alphanumeric': 0.08531109685695959, 'fraction_numerical': 0.0, 'mean_word_length': 2.3121019108280256, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4864822', 'n_tokens_mistral': 507, 'n_tokens_neox': 495, 'n_words': 103}