Module: Zeng::Adapter::TokyoCabinet

Included in:
TokyoTyrant
Defined in:
lib/zeng/adapters/tokyo_cabinet.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



24
25
26
# File 'lib/zeng/adapters/tokyo_cabinet.rb', line 24

def method_missing(method, *args)
  @db.send method, *args
end

Instance Method Details

#delete(key) ⇒ Object



16
17
18
# File 'lib/zeng/adapters/tokyo_cabinet.rb', line 16

def delete(key)
  @db.delete(key)
end

#get(key) ⇒ Object



12
13
14
# File 'lib/zeng/adapters/tokyo_cabinet.rb', line 12

def get(key)
  @db.get(key)
end

#infosObject



20
21
22
# File 'lib/zeng/adapters/tokyo_cabinet.rb', line 20

def infos
  {:adapter=>@adapter, :host=>@host, :port=>@port}
end

#put(key, value) ⇒ Object



8
9
10
# File 'lib/zeng/adapters/tokyo_cabinet.rb', line 8

def put(key, value)
  @db.put(key, value)
end