class Mongo::Operation::CollectionsInfo::Result

Defines custom behavior of results when query the system.namespaces collection.

@since 2.1.0 @api semiprivate

Public Class Methods

new(replies, connection_description, database_name) click to toggle source

Initialize a new result.

@param [ Array<Protocol::Message> | nil ] replies The wire protocol replies, if any. @param [ Server::Description ] connection_description

Server description of the server that performed the operation that
this result is for.

@param [ String ] database_name The name of the database that the

query was sent to.

@api private

Calls superclass method Mongo::Operation::Result::new
# File lib/mongo/operation/collections_info/result.rb, line 36
def initialize(replies, connection_description, database_name)
  super(replies, connection_description)
  @database_name = database_name
end

Public Instance Methods

namespace() click to toggle source

Get the namespace for the cursor.

@example Get the namespace.

result.namespace

@return [ String ] The namespace.

@since 2.1.0 @api private

# File lib/mongo/operation/collections_info/result.rb, line 50
def namespace
  "#{@database_name}.#{Database::NAMESPACES}"
end