class Mova::Storage::Readonly

Wrapper around a storage that protects from writes.

@since 0.1.0

Attributes

storage[R]

Public Class Methods

new(storage) click to toggle source
# File lib/mova/storage/readonly.rb, line 9
def initialize(storage)
  @storage = storage
end

Public Instance Methods

clear() click to toggle source

@return [void]

@note Does nothing

# File lib/mova/storage/readonly.rb, line 42
def clear
end
exist?(key) click to toggle source

@return [Boolean] @param key [String]

# File lib/mova/storage/readonly.rb, line 27
def exist?(key)
  storage.exist?(key)
end
inspect() click to toggle source

@private

# File lib/mova/storage/readonly.rb, line 46
def inspect
  "<##{self.class.name} storage=#{storage.inspect}>"
end
read(key) click to toggle source

@return [String, nil] @param key [String]

# File lib/mova/storage/readonly.rb, line 15
def read(key)
  storage.read(key)
end
read_multi(*keys) click to toggle source

@return [Hash{String => String}] @param keys [*Array<String>]

# File lib/mova/storage/readonly.rb, line 21
def read_multi(*keys)
  storage.read_multi(*keys)
end
write(key, value) click to toggle source

@return [void] @param key [String] @param value [String, nil]

@note Does nothing

# File lib/mova/storage/readonly.rb, line 36
def write(key, value)
end