Sha256: 9e31f320a4072d88ea26c0aab320043bc050c6af23439870704caaab74d88c5c

Contents?: true

Size: 299 Bytes

Versions: 1

Compression:

Stored size: 299 Bytes

Contents

module Novel
  module RepositoryAdapters
    class Memory
      def initialize
        @store = {}
      end

      def find_context(saga_id)
        @store[saga_id]
      end

      def persist_context(saga_id, context)
        @store[saga_id] = context
        context
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
novel-0.3.0 lib/novel/repository_adapters/memory.rb