lib/mongo/operation/write/insert.rb in mongo-2.2.7 vs lib/mongo/operation/write/insert.rb in mongo-2.3.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (C) 2014-2015 MongoDB, Inc. +# Copyright (C) 2014-2016 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # @@ -48,16 +48,16 @@ include Specifiable include Idable private - def execute_write_command(context) + def execute_write_command(server) command_spec = spec.merge(:documents => ensure_ids(documents)) - Result.new(Command::Insert.new(command_spec).execute(context), @ids).validate! + Result.new(Command::Insert.new(command_spec).execute(server), @ids).validate! end - def execute_message(context) - context.with_connection do |connection| + def execute_message(server) + server.with_connection do |connection| Result.new(connection.dispatch([ message, gle ].compact), @ids).validate! end end def message