Sha256: 10d8d0fe95038c93a257f255f1602741d6394acad05932042309594ae75b7430
Contents?: true
Size: 539 Bytes
Versions: 14
Compression:
Stored size: 539 Bytes
Contents
module Vedeu # First-in first-out storage. # # in -> [3] -> [2] -> [1] -> out class FifoStore include Vedeu::Store # @param storage [Array] # @return [Vedeu::FifoStore] def initialize(storage = []) @storage = storage end # @return [Object] def load storage.pop end # @param data [Object] # @return [Array<Object>] def save(data) storage.unshift(data) end private # @return [Array] def in_memory [] end end # FifoStore end # Vedeu
Version data entries
14 entries across 14 versions & 1 rubygems