Method: Couchbase::Datastructures::CouchbaseList#initialize

Defined in:
lib/couchbase/datastructures/couchbase_list.rb

#initialize(id, collection, options = Options::CouchbaseList.new) ⇒ CouchbaseList

Create a new List, backed by the document identified by id in collection.

Parameters:

  • id (String)

    the id of the document to back the list.

  • collection (Collection)

    the Couchbase collection through which to interact with the document.

  • options (Options::CouchbaseList) (defaults to: Options::CouchbaseList.new)

    customization of the datastructure



35
36
37
38
39
40
# File 'lib/couchbase/datastructures/couchbase_list.rb', line 35

def initialize(id, collection, options = Options::CouchbaseList.new)
  @id = id
  @collection = collection
  @options = options
  @cas = 0
end