<commit_before>module Superstructure
  class ValueObj
    class << self
      def new *arguments
        Class.new do
          attr_reader :to_hash

          def initialize(to_hash={})
            @to_hash = to_hash
          end

          define_method(:inspect) do
            opts = arguments.map do |argument|
              "#{argument}=#{public_send(argument).inspect}"
            end.join(", ")
            "#<value_obj #{self.class} #{opts}>"
          end<commit_msg>Refactor #inspect now that we have #to_hash<commit_after>module Superstructure
  class ValueObj
    class << self
      def new *arguments
        Class.new do
          attr_reader :to_hash

          def initialize(to_hash={})
            @to_hash = to_hash
          end

          def inspect
            opts = to_hash.map do |opt_and_value|
              opt_and_value.join("=")
            end.join(", ")
            "#<value_obj #{self.class} #{opts}>"
          end
{'fraction_non_alphanumeric': 0.10178384050367262, 'fraction_numerical': 0.0, 'mean_word_length': 1.7179487179487178, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '1859128', 'n_tokens_mistral': 269, 'n_tokens_neox': 270, 'n_words': 65}