<commit_before>module Gluestick
  class AdaptiveBlueResponse

    # This is the class that wraps the XML response from the API call
    # returned from the Glue API

    attr_accessor :response, :timestamp

    # Takes the Glue API from +Gluestick::Response+ response and wraps it in
    # an object.
    def initialize(response)
      raise ArgumentError if response.kind_of?(Hash)

      response["adaptiveblue"].each_pair do |k,v|
        unless self.respond_to?(k.to_sym)
          self.class.class_eval do
            attr_reader k
          end
        end
        instance_variable_set("@#{k.to_s}", v)
      end<commit_msg>whoops, and if/unless mixup can make a 45 error difference<commit_after>module Gluestick
  class AdaptiveBlueResponse

    # This is the class that wraps the XML response from the API call
    # returned from the Glue API

    attr_accessor :response, :timestamp

    # Takes the Glue API from +Gluestick::Response+ response and wraps it in
    # an object.
    def initialize(response)
      raise ArgumentError unless response.kind_of?(Hash)

      response["adaptiveblue"].each_pair do |k,v|
        unless self.respond_to?(k.to_sym)
          self.class.class_eval do
            attr_reader k
          end
        end
        instance_variable_set("@#{k.to_s}", v)
      end
{'fraction_non_alphanumeric': 0.07170099160945843, 'fraction_numerical': 0.0015255530129672007, 'mean_word_length': 2.6750700280112043, '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': '3483320', 'n_tokens_mistral': 392, 'n_tokens_neox': 378, 'n_words': 124}