class Mongo::Operation::CreateUser
A MongoDB create user command operation.
@api private
@since 2.0.0
Public Instance Methods
execute(server)
click to toggle source
Execute the operation.
@example
operation.execute(server)
@param [ Mongo::Server ] server The server to send the operation to.
@return [ Mongo::Operation::Result ] The operation result.
@since 2.0.0
# File lib/mongo/operation/create_user.rb, line 39 def execute(server) if server.features.op_msg_enabled? OpMsg.new(spec).execute(server) else Command.new(spec).execute(server) end end