Sha256: 8466bfa601f0f21c15fb7457035752611fcf7704c4e6f7b6eaa8c84c95ec0963

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

module Daijobu
  
  module Adapter
    
    class TokyoTyrantAdapter
      
      def initialize(store)
        @store = store
      end
      
      def get(*keys)
        if keys.size == 0
          nil
        elsif keys.size == 1
          @store[keys.first]
        else
          @store.lget(keys)
        end
      end
      
      def set(key, value)
        @store[key] = value
      end
      
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sander6-daijobu-0.2.0 lib/daijobu/adapters/tokyo_tyrant.rb