<commit_before>module Moneta
  # Creates a pool of stores.
  # Each thread gets its own store.
  # @api public
  class Pool < Wrapper
    # @param [Moneta store] adapter The underlying store
    # @param [Hash] options
    def initialize(options = {}, &block)
      super(nil)
      @builder = Builder.new(&block)
      @pool, @active = [], {}
    end

    protected

    def adapter
      @active[Thread.current]
    end

    def wrap(*args)<commit_msg>add example<commit_after>module Moneta
  # Creates a pool of stores.
  # Each thread gets its own store.
  #
  # @example Add `Moneta::Pool` to proxy stack
  #   Moneta.build do
  #     use(:Pool) do
  #       # Every thread gets its own instance
  #       adapter :MemcachedNative
  #     end
  #   end
  #
  # @api public
  class Pool < Wrapper
    # @param [Moneta store] adapter The underlying store
    # @param [Hash] options
    def initialize(options = {}, &block)
      super(nil)
      @builder = Builder.new(&block)
      @pool, @active = [], {}
    end

    protected

    def adapter
      @active[Thread.current]
    end

    def wrap(*args)
{'fraction_non_alphanumeric': 0.10640216411181244, 'fraction_numerical': 0.0, 'mean_word_length': 2.3944954128440368, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1955584', 'n_tokens_mistral': 343, 'n_tokens_neox': 335, 'n_words': 108}