Sha256: 66a65f29fbd31cad126e04c166918c0fe75b3f7e51fd4322f47633207f29f335

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

module Daijobu
  
  module Adapter
    
    class TokyoCabinetAdapter
      
      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_cabinet.rb