Class: Couchbase::Cluster
- Inherits:
-
Object
- Object
- Couchbase::Cluster
- Defined in:
- lib/couchbase/cluster.rb
Instance Attribute Summary collapse
-
#cluster ⇒ Object
readonly
Returns the value of attribute cluster.
Instance Method Summary collapse
- #disconnect ⇒ Object
-
#initialize(hosts = 'localhost') ⇒ Cluster
constructor
A new instance of Cluster.
- #open_bucket(name = 'default', password = '') ⇒ Object
Constructor Details
#initialize(hosts = 'localhost') ⇒ Cluster
26 27 28 |
# File 'lib/couchbase/cluster.rb', line 26 def initialize(hosts = 'localhost') @cluster = CouchbaseCluster.create(hosts) end |
Instance Attribute Details
#cluster ⇒ Object (readonly)
Returns the value of attribute cluster.
24 25 26 |
# File 'lib/couchbase/cluster.rb', line 24 def cluster @cluster end |
Instance Method Details
#disconnect ⇒ Object
34 35 36 |
# File 'lib/couchbase/cluster.rb', line 34 def disconnect @cluster.disconnect end |