Skip to content

Commit 2ec006c

Browse files
committed
tech review
1 parent fbdcc85 commit 2ec006c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/includes/read/cursors.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
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

0 commit comments

Comments
 (0)