Class: Mongo::Cursor::Builder::OpGetMore Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/mongo/cursor/builder/op_get_more.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 behavior around generating an OP_GET_MORE specification.

Since:

  • 2.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ OpGetMore

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.

Create the new builder.

Examples:

Create the builder.

OpGetMore.new(cursor)

Parameters:

  • cursor (Cursor)

    The cursor.

Since:

  • 2.2.0



38
39
40
# File 'lib/mongo/cursor/builder/op_get_more.rb', line 38

def initialize(cursor)
  @cursor = cursor
end

Instance Attribute Details

#cursorCursor (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.

Returns cursor The cursor.

Returns:

  • (Cursor)

    cursor The cursor.

Since:

  • 2.2.0



26
27
28
# File 'lib/mongo/cursor/builder/op_get_more.rb', line 26

def cursor
  @cursor
end

Instance Method Details

#specificationHash

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.

Get the specification.

Examples:

Get the specification.

op_get_more.specification

Returns:

  • (Hash)

    The specification.

Since:

  • 2.2.0



50
51
52
53
54
55
56
57
# File 'lib/mongo/cursor/builder/op_get_more.rb', line 50

def specification
  {
    :to_return => to_return,
    :cursor_id => BSON::Int64.new(cursor.id),
    :db_name   => database.name,
    :coll_name => collection_name,
  }
end