HEX
Server: Apache
System: Linux pdx1-shared-a1-29 6.18.39-grsec-noble+ #4 SMP Thu Jul 23 07:53:29 UTC 2026 x86_64
User: dh_bj99yp (22285841)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //lib/ruby/vendor_ruby/moneta/weak.rb
module Moneta
  # Adds weak create support to the underlying store
  #
  # @note The create method will not be thread or multi-process safe (this is meant by weak)
  # @api public
  class WeakCreate < Proxy
    include CreateSupport

    # @param [Moneta store] adapter The underlying store
    # @param [Hash] options
    def initialize(adapter, options = {})
      raise 'Store already supports feature :create' if adapter.supports?(:create)
      super
    end
  end

  # Adds weak increment support to the underlying store
  #
  # @note The increment method will not be thread or multi-process safe (this is meant by weak)
  # @api public
  class WeakIncrement < Proxy
    include IncrementSupport

    # @param [Moneta store] adapter The underlying store
    # @param [Hash] options
    def initialize(adapter, options = {})
      raise 'Store already supports feature :increment' if adapter.supports?(:increment)
      super
    end
  end
end