123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Operation::ObjectIdGenerator Private

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/mongo/operation/shared/object_id_generator.rb

Overview

The default generator of ids for documents.

Since:

  • 2.2.0

Instance Method Summary

Instance Method Details

#generateBSON::ObjectId

Generate a new id.

Examples:

Generate the id.

object_id_generator.generate

Returns:

  • (BSON::ObjectId)

    The new id.

Since:

  • 2.2.0

[ GitHub ]

  
# File 'lib/mongo/operation/shared/object_id_generator.rb', line 35

def generate
  BSON::ObjectId.new
end