Class: Mongo::Cursor::Builder::KillCursorsCommand
- Inherits:
-
Object
- Object
- Mongo::Cursor::Builder::KillCursorsCommand
- Extended by:
- Forwardable
- Defined in:
- lib/mongo/cursor/builder/kill_cursors_command.rb
Overview
Generates a specification for a kill cursors command.
Instance Attribute Summary collapse
-
#cursor ⇒ Cursor
readonly
Cursor The cursor.
Instance Method Summary collapse
-
#initialize(cursor) ⇒ KillCursorsCommand
constructor
Create the new builder.
-
#specification ⇒ Hash
Get the specification.
Constructor Details
#initialize(cursor) ⇒ KillCursorsCommand
Create the new builder.
38 39 40 |
# File 'lib/mongo/cursor/builder/kill_cursors_command.rb', line 38 def initialize(cursor) @cursor = cursor end |
Instance Attribute Details
#cursor ⇒ Cursor (readonly)
Returns cursor The cursor.
26 27 28 |
# File 'lib/mongo/cursor/builder/kill_cursors_command.rb', line 26 def cursor @cursor end |
Instance Method Details
#specification ⇒ Hash
Get the specification.
50 51 52 |
# File 'lib/mongo/cursor/builder/kill_cursors_command.rb', line 50 def specification { selector: kill_cursors_command, db_name: database.name } end |