<commit_before>module Apidone
  module Client
    class Resource
      
      def initialize(data ={})
        meta_fields(data)
      end
      
private
      def meta_fields(data)
        data.keys.each do |key|
          instance_eval <<-RUBY
            def #{key}
              "#{data[key]}"
            end
          RUBY
        end
      end

    end
  end<commit_msg>add data attr reader to resource<commit_after>module Apidone
  module Client
    class Resource
      
      attr_reader :data
      def initialize(data ={})
        @data = data
        meta_fields(data)
      end
      
private
      def meta_fields(data)
        data.keys.each do |key|
          instance_eval <<-RUBY
            def #{key}
              "#{data[key]}"
            end
          RUBY
        end
      end

    end
  end
{'fraction_non_alphanumeric': 0.0745721271393643, 'fraction_numerical': 0.0, 'mean_word_length': 1.3333333333333333, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2337741', 'n_tokens_mistral': 241, 'n_tokens_neox': 236, 'n_words': 62}