Sha256: ce920cdc3875e9cf1cf436fbcbd11eda8c5f55cb000807b9643812a5be3d410b
Contents?: true
Size: 722 Bytes
Versions: 8
Compression:
Stored size: 722 Bytes
Contents
module Vedeu # Name/Value storage. # # name: [value] # # @api private class AssociativeStore include Vedeu::Store # @param storage [Hash] # @return [Vedeu::AssociativeStore] def initialize(storage = {}) @storage = storage end # @param name [String] def load(name) return nil if empty? storage[name] end # @param data [Object] # @param name [String|Symbol] def save(data, name = nil) if name storage[name] = data elsif data.respond_to?(:name) storage[data.name] = data end storage end private # @return [Hash] def in_memory {} end end # AssociativeStore end # Vedeu
Version data entries
8 entries across 8 versions & 1 rubygems