Class: Couchbase::Protostellar::Bucket Private
- Inherits:
-
Object
- Object
- Couchbase::Protostellar::Bucket
- Defined in:
- lib/couchbase/protostellar/bucket.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #name ⇒ Object readonly private
Instance Method Summary collapse
- #collection(name) ⇒ Object private
- #collections ⇒ Object private
- #default_collection ⇒ Object private
- #default_scope ⇒ Object private
-
#initialize(client, name) ⇒ Bucket
constructor
private
A new instance of Bucket.
- #ping(_options = Options::Ping::DEFAULT) ⇒ Object private
- #scope(name) ⇒ Object private
Constructor Details
#initialize(client, name) ⇒ Bucket
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Bucket.
25 26 27 28 |
# File 'lib/couchbase/protostellar/bucket.rb', line 25 def initialize(client, name) @client = client @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/couchbase/protostellar/bucket.rb', line 23 def name @name end |
Instance Method Details
#collection(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/couchbase/protostellar/bucket.rb', line 34 def collection(name) default_scope.collection(name) end |
#collections ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/couchbase/protostellar/bucket.rb', line 46 def collections Management::CollectionManager.new(client: @client, bucket_name: @name) end |
#default_collection ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 |
# File 'lib/couchbase/protostellar/bucket.rb', line 42 def default_collection default_scope.collection("_default") end |
#default_scope ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/couchbase/protostellar/bucket.rb', line 38 def default_scope Scope.new(@client, @name, "_default") end |
#ping(_options = Options::Ping::DEFAULT) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/couchbase/protostellar/bucket.rb', line 50 def ping( = Options::Ping::DEFAULT) raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping" end |