lib/mongo/operation/result.rb
# Check the first document's ok field.
#
# @example Check the ok field.
#   result.ok?
#
# @return [ true, false ] If the command returned ok.
#
# @since 2.1.0
# @api public
Check the first document's ok field.
Check the first document ' s ok field .
def ok?
        first_document[OK] == 1
      end
def ok? first_document [ OK ] == 1 end
Check the first document's ok field.
Check the first document ' s ok field .
# first_document[OK] is a float, and the server can return # ok as a BSON int32, BSON int64 or a BSON double. # The number 1 is exactly representable in a float, hence # 1.0 == 1 is going to perform correctly all of the time # (until the server returns something other than 1 for success, that is)
If the command returned ok.
If the command returned ok .
 true, false 
example
Check the ok field.
Check the ok field .
since
None
api
None