Class: Array

Inherits:
Object show all
Defined in:
lib/jmongo/mongo/ruby_ext.rb

Instance Method Summary collapse

Instance Method Details

#to_bsonObject



37
38
39
40
41
42
43
# File 'lib/jmongo/mongo/ruby_ext.rb', line 37

def to_bson
  list = Array.new #Java::ComMongodb::DBObject[ary.length].new
  self.each_with_index do |ele, i|
    list[i] = ele.to_bson
  end
  list
end