class Mongo::Operation::Command::OpMsg
A MongoDB command operation sent as an op message.
@api private
@since 2.5.2
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.5.2
# File lib/mongo/operation/command/op_msg.rb, line 39 def execute(server) result = Result.new(dispatch_message(server)) process_result(result, server) result.validate! end
Private Instance Methods
message(server)
click to toggle source
# File lib/mongo/operation/command/op_msg.rb, line 47 def message(server) Protocol::Msg.new(flags, options, command(server)) end