<commit_before>require 'active_support'
require 'active_support/core_ext'

require 'expedition/client'
require 'expedition/version'

module Expedition

  ##
  # Initializes a new {Expedition::Client}.
  #
  # @param [String] host
  #   The host to connect to.
  #
  # @param [Integer] port
  #   The port to connect to.
  #
  # @return [Client]
  #   A client for accessing the API of a cgminer-compatible service.
  def self.new(host = 'localhost', port = 4028)
    Client.new(host, port)
  end

  ##
  # Returns the default client for connection to `localhost` on port `4028`.
  # Used for simple scripts that access the `Expedition` constant directly.
  #
  # @return [Client]<commit_msg>Delegate Client methods in Expedition module<commit_after>require 'active_support/core_ext/module/delegation'

require 'expedition/client'
require 'expedition/version'

module Expedition

  class << self
    ##
    # @return [Client]
    #   A client for accessing the API of a cgminer-compatible service.
    attr_accessor :client

    delegate(*Client.public_instance_methods(false), to: :client)
  end

  ##
  # Initializes a new {Expedition::Client}.
  #
  # @param [String] host
  #   The host to connect to.
  #
  # @param [Integer] port
  #   The port to connect to.
  #
  # @return [Client]
  #   A client for accessing the API of a cgminer-compatible service.
  def self.new(host = 'localhost', port = 4028)
    Client.new(host, port)
  end

  ##
  # Returns the default client for connection to `localhost` on port `4028`.
  # Used for simple scripts that access the `Expedition` constant directly.
  #
  # @return [Client]
{'fraction_non_alphanumeric': 0.10283251231527094, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 3.452054794520548, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5349799', 'n_tokens_mistral': 536, 'n_tokens_neox': 514, 'n_words': 168}