@@ -121,7 +121,7 @@ Retrieve All Documents
121
121
To retrieve all documents from a cursor, convert the cursor into an array by using
122
122
the ``to_a`` method on its corresponding ``Mongo::Collection::View`` object.
123
123
124
- The following example calls the ``to_a`` to store the cursor results
124
+ The following example calls the ``to_a`` method to store the cursor results
125
125
in an array:
126
126
127
127
.. literalinclude:: /includes/read/cursors.rb
@@ -140,17 +140,19 @@ can use a **tailable cursor** that remains open after the client exhausts the
140
140
results in a cursor. To create a tailable cursor, pass the ``cursor_type`` option to
141
141
the ``find`` method. Set this option to ``:tailable``.
142
142
143
- For example, you can create a capped collection called ``vegetables`` that stores
144
- documents representing vegetables, as shown in the following code:
143
+ For example, you can create a capped collection called ``vegetables``, as
144
+ shown in the following code:
145
145
146
146
.. literalinclude:: /includes/read/cursors.rb
147
147
:language: ruby
148
148
:dedent:
149
149
:start-after: start-capped-coll
150
150
:end-before: end-capped-coll
151
151
152
- The following code uses a tailable cursor to retrieve all documents in the ``vegetables``
153
- collection. After the cursor is exhausted, it remains open until retrieving three documents:
152
+ Then, you can use the following code to retrieve all documents
153
+ in the ``vegetables`` collection and store the results in a tailable
154
+ cursor. After the cursor is exhausted, it remains open until
155
+ retrieving three documents:
154
156
155
157
.. io-code-block::
156
158
:copyable:
0 commit comments