<commit_before>module ActiveResource
  module Nestful
    class Connection
      class Result
        attr_reader :body
        
        def initialize(body)
          @body = body
        end
      end
  
      def initialize(site, format = :xml)
        @options = {}
        @site    = site
        @options[:format] = format
      end
    
      def get(path, headers = {})
        request(path, :headers => headers).execute
      end
  
      def delete(path, headers = {})
        request(path, :method => :delete, :headers => headers).execute
      end
  
      def put(path, body = '', headers = {})
        request(path, :method => :put, :body => body, :headers => headers).execute
      end
  
      def post(path, body = '', headers = {})
        request(path, :method => :post, :body => body, :headers => headers).execute
      end
  
      def head(path, headers = {})
        request(path, :method => :head, :headers => headers).execute
      end
      
      def method_missing(name, *args)
        if name.to_s =~ /=$/
          @options[$`.to_sym] = args.first
        else
          super
        end
      end
  
      private
        def request(path, options = {})
          Result.new(::Nestful::Request.new(@site.dup + path, options.merge(@options)))
        end
    end
  end
end<commit_msg>call execute on the result class<commit_after>module ActiveResource
  module Nestful
    class Connection
      class Result
        attr_reader :body
        
        def initialize(body)
          @body = body
        end
      end
  
      def initialize(site, format = :xml)
        @options = {}
        @site    = site
        @options[:format] = format
      end
    
      def get(path, headers = {})
        request(path, :headers => headers)
      end
  
      def delete(path, headers = {})
        request(path, :method => :delete, :headers => headers)
      end
  
      def put(path, body = '', headers = {})
        request(path, :method => :put, :body => body, :headers => headers)
      end
  
      def post(path, body = '', headers = {})
        request(path, :method => :post, :body => body, :headers => headers)
      end
  
      def head(path, headers = {})
        request(path, :method => :head, :headers => headers)
      end
      
      def method_missing(name, *args)
        if name.to_s =~ /=$/
          @options[$`.to_sym] = args.first
        else
          super
        end
      end
  
      private
        def request(path, options = {})
          request = ::Nestful::Request.new(@site.dup + path, options.merge(@options))
          Result.new(request.execute)
        end
    end
  end
end
{'fraction_non_alphanumeric': 0.12589792060491492, 'fraction_numerical': 0.0, 'mean_word_length': 1.7648902821316614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2260483', 'n_tokens_mistral': 755, 'n_tokens_neox': 764, 'n_words': 200}