Module: Couchbase
- Defined in:
- lib/couchbase.rb,
lib/couchbase/bucket.rb,
lib/couchbase/version.rb,
ext/couchbase_ext/couchbase_ext.c
Overview
Couchbase ruby client
Defined Under Namespace
Modules: Error Classes: Bucket, Result
Constant Summary collapse
- VERSION =
"1.1.4"
Class Attribute Summary collapse
-
.connection_options ⇒ Hash, String
Default connection options.
Class Method Summary collapse
-
.bucket ⇒ Bucket
The connection instance for current thread.
-
.bucket=(connection) ⇒ Bucket
Set a connection instance for current thread.
-
.connect(*options) ⇒ Bucket
(also: new)
The method
connect
initializes new Bucket instance with all arguments passed.
Class Attribute Details
.connection_options ⇒ Hash, String
Default connection options
55 56 57 |
# File 'lib/couchbase.rb', line 55 def @connection_options end |
Class Method Details
.bucket ⇒ Bucket
The connection instance for current thread
68 69 70 |
# File 'lib/couchbase.rb', line 68 def bucket thread_storage[:bucket] ||= connect(*) end |
.bucket=(connection) ⇒ Bucket
Set a connection instance for current thread
75 76 77 |
# File 'lib/couchbase.rb', line 75 def bucket=(connection) thread_storage[:bucket] = connection end |