Sha256: 70ac5fa1333c5a931aaf8fc40e0d96e911ffb87c09c2d1a3f614fb67642c3dee

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 Bytes

Contents

module Moneta
  module Adapters
    # Null backend which doesn't store anything
    # @api public
    class Null
      include Defaults

      # @param [Hash] options Options hash
      def initialize(options = {}); end

      # (see Proxy#key?)
      def key?(key, options = {})
        false
      end

      # (see Proxy#load)
      def load(key, options = {})
        nil
      end

      # (see Proxy#store)
      def store(key, value, options = {})
        value
      end

      # (see Proxy#delete)
      def delete(key, options = {})
        nil
      end

      # (see Proxy#clear)
      def clear(options = {})
        self
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
moneta-1.6.0 lib/moneta/adapters/null.rb
moneta-1.5.2 lib/moneta/adapters/null.rb
moneta-1.5.1 lib/moneta/adapters/null.rb
moneta-1.5.0 lib/moneta/adapters/null.rb
moneta-1.4.2 lib/moneta/adapters/null.rb
moneta-1.4.1 lib/moneta/adapters/null.rb
moneta-1.4.0 lib/moneta/adapters/null.rb
moneta-1.3.0 lib/moneta/adapters/null.rb
moneta-1.2.1 lib/moneta/adapters/null.rb
moneta-1.2.0 lib/moneta/adapters/null.rb