<commit_before>module SoapyYandex
  class Client
    attr_reader :opts

    def initialize(opts)
      @opts = opts
    end

    protected

    def run(request)
      unless request.is_a?(Request)
        raise ArgumentError, 'Request must be a SoapyYandex::Request object'
      end

      http_request = HTTParty.post(
        uri_base + request.api_path,
        headers: headers,
        verify_peer: false,
        pem: ssl_cert.to_pem + ssl_key.to_pem,
        body: sign(request.to_s)
      )
      extract_response(http_request.body)
    end

    private

    def extract_response(body)<commit_msg>Remove unnecessary type check<commit_after>module SoapyYandex
  class Client
    attr_reader :opts

    def initialize(opts)
      @opts = opts
    end

    protected

    def run(request)
      http_request = HTTParty.post(
        uri_base + request.api_path,
        headers: headers,
        verify_peer: false,
        pem: ssl_cert.to_pem + ssl_key.to_pem,
        body: sign(request.to_s)
      )
      extract_response(http_request.body)
    end

    private

    def extract_response(body)
{'fraction_non_alphanumeric': 0.07155797101449275, 'fraction_numerical': 0.0, 'mean_word_length': 2.379204892966361, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1044948', 'n_tokens_mistral': 361, 'n_tokens_neox': 352, 'n_words': 77}