HEX
Server: Apache
System: Linux pdx1-shared-a2-01 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: dh_mhscom (5469217)
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