minor: readme fix
This commit is contained in:
parent
3479317098
commit
a133fdd4e8
12
README.rdoc
12
README.rdoc
|
@ -9,15 +9,15 @@ Here's a quick code sample. See the MongoDB Ruby Tutorial
|
||||||
require 'mongo'
|
require 'mongo'
|
||||||
include Mongo
|
include Mongo
|
||||||
|
|
||||||
@db = Connection.new.db('sample-db')
|
db = Connection.new.db('sample-db')
|
||||||
@coll = db.collection('test')
|
coll = db.collection('test')
|
||||||
|
|
||||||
@coll.remove
|
coll.remove
|
||||||
3.times do |i|
|
3.times do |i|
|
||||||
@coll.insert({'a' => i+1})
|
coll.insert({'a' => i+1})
|
||||||
end
|
end
|
||||||
puts "There are #{@coll.count()} records. Here they are:"
|
puts "There are #{coll.count()} records. Here they are:"
|
||||||
@coll.find().each { |doc| puts doc.inspect }
|
coll.find().each { |doc| puts doc.inspect }
|
||||||
|
|
||||||
= Installation
|
= Installation
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue