Class: Ccp::Kvs::Tokyo::Base
- Inherits:
-
Object
- Object
- Ccp::Kvs::Tokyo::Base
- Includes:
- Core, TokyoCabinet
- Defined in:
- lib/ccp/kvs/tokyo/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#info ⇒ Object
info.
-
#path ⇒ Object
kvs.
Methods included from Core
#[], #[]=, #close, #codec, #codec!, #count, #decode, #del, #encode, #exist?, #ext, #get, included, #key?, #keys, #open, #out, #put, #read, #set, #source, #touch, #write
Instance Method Details
#info ⇒ Object
info
11 12 13 14 15 16 17 |
# File 'lib/ccp/kvs/tokyo/base.rb', line 11 def info if path.exist? Tokyo::Info.parse(`tcamgr inform #{path}`) else raise Ccp::Kvs::NotConnected, "%s(%s)" % [ self.class, @source] end end |
#path ⇒ Object
kvs
22 23 24 25 |
# File 'lib/ccp/kvs/tokyo/base.rb', line 22 def path file = @source.to_s.sub(/#.*$/, '') # parse "foo.tch#mode=r" Pathname(file) end |