Class: Mongo::Cursor::Builder::GetMoreCommand

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

Overview

Generates a specification for a get more command.

Since:

  • 2.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ GetMoreCommand

Create the new builder.

Examples:

Create the builder.

GetMoreCommand.new(cursor)

Parameters:

  • cursor (Cursor)

    The cursor.

Since:

  • 2.2.0



39
40
41
# File 'lib/mongo/cursor/builder/get_more_command.rb', line 39

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/get_more_command.rb', line 26

def cursor
  @cursor
end

Instance Method Details

#specificationHash

Get the specification.

Examples:

Get the specification.

get_more_command.specification

Returns:

  • (Hash)

    The spec.

Since:

  • 2.2.0



51
52
53
# File 'lib/mongo/cursor/builder/get_more_command.rb', line 51

def specification
  { selector: get_more_command, db_name: database.name }
end