Method: Mongo::Operation::ListCollections::Result#documents

Defined in:
lib/mongo/operation/list_collections/result.rb

#documentsArray<BSON::Document>

Get the documents for the listCollections result. It is the ‘firstBatch’

field in the 'cursor' field of the first document returned.

Examples:

Get the documents.

result.documents

Returns:

  • (Array<BSON::Document>)

    The documents.

Since:

  • 2.0.0



70
71
72
# File 'lib/mongo/operation/list_collections/result.rb', line 70

def documents
  cursor_document[FIRST_BATCH]
end