Sha256: ee2e346a2dd8810c001bc18d6d7858685dd6ad20bf5a66406ae4249a70df0b60

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

require 'mini_memory_store'

module Watchdocs
  module Rails
    module Store
      module MemoryStore
        class << self
          def write(content)
            store.set(content)
          end

          def read
            store.get
          end

          def delete!
            store.clear
          end

          def exists?
            store.get
          end

          private

          def store
            @store ||= MiniMemoryStore.new
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watchdocs-rails-0.1.1 lib/watchdocs/rails/store/memory_store.rb
watchdocs-rails-0.1.0 lib/watchdocs/rails/store/memory_store.rb