Sha256: 19a09d913eda647a776035d47fb43ce0cb5f84bcac3d30260071603467ff7f3c

Contents?: true

Size: 335 Bytes

Versions: 4

Compression:

Stored size: 335 Bytes

Contents

module Undo
  module Storage
    class Memory
      def initialize(options = {})
      end

      def put(uuid, object)
        storage[uuid] = object
      end

      def fetch(uuid)
        storage.fetch(uuid)
      end

      private
      attr_writer :storage

      def storage
        @storage ||= {}
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
undo-0.1.1 lib/undo/storage/memory.rb
undo-0.1.0 lib/undo/storage/memory.rb
undo-0.0.3 lib/undo/storage/memory.rb
undo-0.0.2 lib/undo/storage/memory.rb