123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Inherits: Object
Defined in: lib/mongo/protocol/msg.rb

Overview

Encapsulates a type 1 OP_MSG section.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(identifier, documents) ⇒ Section1

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/protocol/msg.rb', line 351

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

Instance Attribute Details

#documents (readonly)

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/protocol/msg.rb', line 355

attr_reader :identifier, :documents

#identifier (readonly)

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/protocol/msg.rb', line 355

attr_reader :identifier, :documents

Instance Method Details

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

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/protocol/msg.rb', line 357

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

#eql?(other)

Alias for #==.

[ GitHub ]

  
# File 'lib/mongo/protocol/msg.rb', line 362

alias eql? ==