simplified example

This commit is contained in:
Jim Menard 2008-12-17 11:43:00 -05:00
parent 011280282d
commit 5cdf60f157
1 changed files with 1 additions and 8 deletions

View File

@ -11,14 +11,7 @@ db = Mongo.new(host, port).db('ruby-mongo-examples-simple')
coll = db.collection('test')
coll.clear
doc = {'a' => 1}
coll.insert(doc)
doc = {'a' => 2}
coll.insert(doc)
doc = {'a' => 3}
coll.insert(doc)
3.times { |i| coll.insert({'a' => i+1}) }
puts "There are #{coll.count()} records in the test collection. Here they are:"
coll.find().each { |doc| puts doc.inspect }