Class: Mongo::Operation::UsersInfo::Result

Inherits:
Result
  • Object
show all
Defined in:
lib/mongo/operation/users_info/result.rb

Overview

Defines custom behavior of results when using the usersInfo command.

Since:

  • 2.1.0

Constant Summary collapse

USERS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The field name for the users document in a usersInfo result.

Since:

  • 2.1.0

'users'.freeze

Constants inherited from Result

Result::CURSOR, Result::CURSOR_ID, Result::FIRST_BATCH, Result::N, Result::NAMESPACE, Result::NEXT_BATCH, Result::OK, Result::RESULT

Instance Attribute Summary

Attributes inherited from Result

#connection, #connection_description, #connection_global_id, #context, #replies

Instance Method Summary collapse

Methods inherited from Result

#acknowledged?, #cluster_time, #cursor_id, #each, #error, #has_cursor_id?, #initialize, #inspect, #labels, #namespace, #ok?, #operation_time, #reply, #returned_count, #snapshot_timestamp, #successful?, #topology_version, #validate!, #write_concern_error?, #written_count

Constructor Details

This class inherits a constructor from Mongo::Operation::Result

Instance Method Details

#documentsObject

Since:

  • 2.1.0



36
37
38
# File 'lib/mongo/operation/users_info/result.rb', line 36

def documents
  reply.documents.first[USERS]
end