File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1515
1616 # Iterates over and prints all documents that have a "name" value of "Dunkin' Donuts"
1717 # start-cursor-iterate
18- cursor = collection . find ( { name : "Dunkin' Donuts" } )
18+ cursor = collection . find ( name : "Dunkin' Donuts" )
1919 cursor . each do |doc |
2020 puts doc
2121 end
2222 # end-cursor-iterate
2323
2424 # Retrieves and prints the first document stored in the cursor
2525 # start-cursor-first
26- cursor = collection . find ( { name : "Dunkin' Donuts" } )
26+ cursor = collection . find ( name : "Dunkin' Donuts" )
2727 first_doc = cursor . first
2828 puts first_doc
2929 # end-cursor-first
3030
3131 # Converts the documents stored in a cursor to an array
3232 # start-cursor-array
33- cursor = collection . find ( { name : "Dunkin' Donuts" } )
33+ cursor = collection . find ( name : "Dunkin' Donuts" )
3434 array_results = cursor . to_a
3535 # end-cursor-array
3636
You can’t perform that action at this time.
0 commit comments