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

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/mongo/cursor/builder/op_get_more.rb

Overview

Encapsulates behaviour around generating an OP_GET_MORE specification.

Since:

  • 2.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ OpGetMore

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)

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

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 => cursor.id,
    :db_name   => database.name,
    :coll_name => collection_name
  }
end