<commit_before>module EPP
  # Front facing EPP Client.
  #
  # Establishes a connection to an EPP server and allows for sending commands
  # to that EPP server.
  class Client
    # Default Service URNs
    #
    # Provided to make it easier for clients to add additional services to
    # the default list.
    #
    # @example
    #   services = DEFAULT_SERVICES + %w(urn:ietf:params:xml:ns:secDNS-1.1)
    #   EPP::Client.new('username','password','epp.example.com', :services => services)
    DEFAULT_SERVICES = %w(
      urn:ietf:params:xml:ns:domain-1.0
      urn:ietf:params:xml:ns:contact-1.0
      urn:ietf:params:xml:ns:host-1.0 )

    # Create new instance of EPP::Client.
    #
    # @param [String] tag EPP Tag
    # @param [String] passwd EPP Tag password
    # @param [String] host EPP Host address
    # @param [Hash] options Options
    # @option options [Integer] :port EPP Port number, default 700
    # @option options [Boolean] :compatibility Compatibility mode, default false
    # @option options [String] :lang EPP Language code, default 'en'
    # @option options [String] :version EPP protocol version, default '1.0'
    # @option options [Array<String>] :extensions EPP Extension URNs
    # @option options [Array<String>] :services EPP Service URNs
    # @option options [String] :address_family 'AF_INET' or 'AF_INET6' or either of the
    #                          appropriate socket constants. Will cause connections to be
    #                          limited to this address family. Default try all addresses.
    def initialize(tag, passwd, host, options = {})
      @conn = if options.delete(:compatibility) == true
        OldServer.new(tag, passwd, host, options)
      else
        Server.new(tag, passwd, host, options)
      end
    end

    # Returns the last request sent to the EPP server
    #
    # @return [Request] last request sent to the EPP server
    def last_request
      @conn.last_request
    end

    # Returns the last request sent to the EPP server
    #
    # @deprecated
    # @return [Request] last request sent to the EPP server
    def _last_request
      warn "The #{self.class}#_last_request method is deprecated, please call #last_request"
      last_request
    end

    # Returns the last response received from the EPP server
    #
    # @return [Response] last response received from the EPP server
    def last_response
      @conn.last_response
    end

    # Returns the last response received from the EPP server
    #
    # @deprecated
    # @return [Response] last response received from the EPP server
    def _last_response<commit_msg>Add properties on EPP::Client<commit_after>module EPP
  # Front facing EPP Client.
  #
  # Establishes a connection to an EPP server and allows for sending commands
  # to that EPP server.
  class Client
    # Default Service URNs
    #
    # Provided to make it easier for clients to add additional services to
    # the default list.
    #
    # @example
    #   services = DEFAULT_SERVICES + %w(urn:ietf:params:xml:ns:secDNS-1.1)
    #   EPP::Client.new('username','password','epp.example.com', :services => services)
    DEFAULT_SERVICES = %w(
      urn:ietf:params:xml:ns:domain-1.0
      urn:ietf:params:xml:ns:contact-1.0
      urn:ietf:params:xml:ns:host-1.0 )

    # Create new instance of EPP::Client.
    #
    # @param [String] tag EPP Tag
    # @param [String] passwd EPP Tag password
    # @param [String] host EPP Host address
    # @param [Hash] options Options
    # @option options [Integer] :port EPP Port number, default 700
    # @option options [Boolean] :compatibility Compatibility mode, default false
    # @option options [String] :lang EPP Language code, default 'en'
    # @option options [String] :version EPP protocol version, default '1.0'
    # @option options [Array<String>] :extensions EPP Extension URNs
    # @option options [Array<String>] :services EPP Service URNs
    # @option options [String] :address_family 'AF_INET' or 'AF_INET6' or either of the
    #                          appropriate socket constants. Will cause connections to be
    #                          limited to this address family. Default try all addresses.
    def initialize(tag, passwd, host, options = {})
      @tag, @passwd, @host, @options = tag, passwd, host, options
      @conn = if options.delete(:compatibility) == true
        OldServer.new(tag, passwd, host, options)
      else
        Server.new(tag, passwd, host, options)
      end
    end

    attr_reader :tag, :passwd, :host, :options

    def compatibility?
      @conn.is_a?(OldServer)
    end

    # Returns the last request sent to the EPP server
    #
    # @return [Request] last request sent to the EPP server
    def last_request
      @conn.last_request
    end

    # Returns the last request sent to the EPP server
    #
    # @deprecated
    # @return [Request] last request sent to the EPP server
    def _last_request
      warn "The #{self.class}#_last_request method is deprecated, please call #last_request"
      last_request
    end

    # Returns the last response received from the EPP server
    #
    # @return [Response] last response received from the EPP server
    def last_response
      @conn.last_response
    end

    # Returns the last response received from the EPP server
    #
    # @deprecated
    # @return [Response] last response received from the EPP server
    def _last_response
{'fraction_non_alphanumeric': 0.08669987087253274, 'fraction_numerical': 0.005165098690278546, 'mean_word_length': 2.842664776754075, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '3185863', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1571, 'n_words': 567}