Class: Couchbase::Protostellar::Bucket Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#nameObject (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

#collectionsObject

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_collectionObject

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_scopeObject

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 = Options::Ping::DEFAULT)
  raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping"
end

#scope(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.



30
31
32
# File 'lib/couchbase/protostellar/bucket.rb', line 30

def scope(name)
  Scope.new(@client, @name, name)
end