Class: Mongo::Cursor::Builder::OpKillCursors
- Inherits:
-
Object
- Object
- Mongo::Cursor::Builder::OpKillCursors
- Extended by:
- Forwardable
- Defined in:
- lib/mongo/cursor/builder/op_kill_cursors.rb
Overview
Encapsulates behaviour around generating an OP_KILL_CURSORS specification.
Instance Attribute Summary collapse
-
#cursor ⇒ Cursor
readonly
Cursor The cursor.
Instance Method Summary collapse
-
#initialize(cursor) ⇒ OpKillCursors
constructor
Create the new builder.
-
#specification ⇒ Hash
Get the specification.
Constructor Details
#initialize(cursor) ⇒ OpKillCursors
Create the new builder.
38 39 40 |
# File 'lib/mongo/cursor/builder/op_kill_cursors.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/op_kill_cursors.rb', line 26 def cursor @cursor end |
Instance Method Details
#specification ⇒ Hash
Get the specification.
50 51 52 |
# File 'lib/mongo/cursor/builder/op_kill_cursors.rb', line 50 def specification { :coll_name => collection_name, :db_name => database.name, :cursor_ids => [ cursor.id ] } end |