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, connection_global_id, 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 [ Integer ] connection_global_id
Global id of the connection on which the operation that this result is for was performed.
@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 42 def initialize(replies, connection_description, connection_global_id, database_name) super(replies, connection_description, connection_global_id) @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 56 def namespace "#{@database_name}.#{Database::NAMESPACES}" end