123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Cursor::KillSpec Private

Relationships & Source Files
Inherits: Object
Defined in: lib/mongo/cursor/kill_spec.rb

Overview

This class contains the operation specification for KillCursors.

Its purpose is to ensure we don't misspell attribute names accidentally.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(cursor_id:, coll_name:, db_name:, connection_global_id:, server_address:, session:, connection: nil) ⇒ KillSpec

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 25

def initialize(
  cursor_id:,
  coll_name:,
  db_name:,
  connection_global_id:,
  server_address:,
  session:,
  connection: nil
)
  @cursor_id = cursor_id
  @coll_name = coll_name
  @db_name = db_name
  @connection_global_id = connection_global_id
  @server_address = server_address
  @session = session
  @connection = connection
end

Instance Attribute Details

#coll_name (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#connection (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#connection_global_id (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#cursor_id (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#db_name (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#server_address (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

#session (readonly)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 43

attr_reader :cursor_id,
            :coll_name,
            :db_name,
            :connection_global_id,
            :server_address,
            :session,
            :connection

Instance Method Details

#==(other)

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 51

def ==(other)
  cursor_id == other.cursor_id &&
    coll_name == other.coll_name &&
    db_name == other.db_name &&
    connection_global_id == other.connection_global_id &&
    server_address == other.server_address &&
    session == other.session
end

#eql?(other) ⇒ Boolean

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 60

def eql?(other)
  self == other
end

#hash

[ GitHub ]

  
# File 'lib/mongo/cursor/kill_spec.rb', line 64

def hash
  [
    cursor_id,
    coll_name,
    db_name,
    connection_global_id,
    server_address,
    session,
  ].compact.hash
end