Class: Mongo::Protocol::Msg::Section1 Private

Inherits:
Object
  • Object
show all
Defined in:
build/ruby-driver-master/lib/mongo/protocol/msg.rb

Overview

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

Encapsulates a type 1 OP_MSG section.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier, documents) ⇒ Section1

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

Returns a new instance of Section1.

Since:

  • 2.5.0



345
346
347
# File 'build/ruby-driver-master/lib/mongo/protocol/msg.rb', line 345

def initialize(identifier, documents)
  @identifier, @documents = identifier, documents
end

Instance Attribute Details

#documentsObject (readonly)

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

Since:

  • 2.5.0



349
350
351
# File 'build/ruby-driver-master/lib/mongo/protocol/msg.rb', line 349

def documents
  @documents
end

#identifierObject (readonly)

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

Since:

  • 2.5.0



349
350
351
# File 'build/ruby-driver-master/lib/mongo/protocol/msg.rb', line 349

def identifier
  @identifier
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

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

Since:

  • 2.5.0



351
352
353
354
# File 'build/ruby-driver-master/lib/mongo/protocol/msg.rb', line 351

def ==(other)
  other.is_a?(Section1) &&
    identifier == other.identifier && documents == other.documents
end