<commit_before>module ActiveCart
  module StorageEngines
    
    class MongoidStorage
      include Mongoid::Document
      include Mongoid::Timestamps
      include ActiveCart::CartStorage
      
      embeds_many :items, :class_name => "ActiveCart::Items::MongoidItem"

      def invoice_id
         self._id
      end
      
      # delegate that these item 'lookup' methods are called on the :items collection
      extend Forwardable
      def_delegators :items, :include?, :<<, :inject, :index, :at, :delete_at
      
    end
    
  end
end<commit_msg>delegated more item 'lookup' methods to the :items collection<commit_after>module ActiveCart
  module StorageEngines
    
    class MongoidStorage
      include Mongoid::Document
      include Mongoid::Timestamps
      include ActiveCart::CartStorage
      
      embeds_many :items, :class_name => "ActiveCart::Items::MongoidItem"

      def invoice_id
         self._id
      end
      
      # delegate that these item 'lookup' methods are called on the :items collection
      extend Forwardable
      def_delegators :items, :[], :<<, :[]=, :at, :clear, :collect, :map, :delete, :delete_at, :each, :each_index, :empty?, :eql?, :first, :include?, :index, :inject, :last, :length, :pop, :push, :shift, :size, :unshift
      
    end
    
  end
end
{'fraction_non_alphanumeric': 0.09785932721712538, 'fraction_numerical': 0.0, 'mean_word_length': 2.9074626865671642, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4549161', 'n_tokens_mistral': 387, 'n_tokens_neox': 384, 'n_words': 111}