Sha256: 42d3c48b99b61425a3300172164f361ceaf2d130e73023fb15a55012eb17024e

Contents?: true

Size: 421 Bytes

Versions: 4

Compression:

Stored size: 421 Bytes

Contents

module SplitIoClient
  module Cache
    class Repository
      def initialize(adapter)
        @adapter = adapter

        @adapter[namespace_key('ready')] = false
      end

      def []=(key, obj)
        @adapter[namespace_key(key)] = obj
      end

      def [](key)
        @adapter[namespace_key(key)]
      end

      protected

      def namespace_key(key)
        "repository_#{key}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
splitclient-rb-3.0.3 lib/cache/repositories/repository.rb
splitclient-rb-3.0.3.pre.rc2 lib/cache/repositories/repository.rb
splitclient-rb-3.0.3.pre.rc1 lib/cache/repositories/repository.rb
splitclient-rb-3.0.2 lib/cache/repositories/repository.rb