Sha256: 60a863ebedc0d14c5b55a5c889d053fbb4ebe83e331d6ee660a21f51a6065d52

Contents?: true

Size: 387 Bytes

Versions: 7

Compression:

Stored size: 387 Bytes

Contents

module PansophyAuthenticator
  module CacheStores
    class Memory
      def initialize
        @hash = {}
      end

      def read(key)
        @hash[key.to_s]
      end

      def write(key, value)
        @hash[key.to_s] = value
      end

      def delete(key)
        @hash.delete(key.to_s)
      end

      def exist?(key)
        @hash.key?(key.to_s)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pansophy_authenticator-0.5.0 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.4.3 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.4.2 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.4.1 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.4.0 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.3.0 lib/pansophy_authenticator/cache_stores/memory.rb
pansophy_authenticator-0.2.0 lib/pansophy_authenticator/cache_stores/memory.rb