lib/mongo3/node.rb in mongo3-0.1.2 vs lib/mongo3/node.rb in mongo3-0.1.3
- old
+ new
@@ -1,17 +1,17 @@
require 'json'
-require 'mongo/util/ordered_hash'
+require 'bson/ordered_hash'
module Mongo3
class Node
attr_accessor :oid, :name, :children, :data, :parent
def initialize( oid, name, data=nil )
@oid = oid
@name = name
@children = []
- @data = data || OrderedHash.new
+ @data = data || BSON::OrderedHash.new
@parent = nil
end
def self.make_node( name )
Node.new( name, name, :path_ids => name, :path_names => name )
@@ -76,10 +76,10 @@
# cltn
end
# converts to json
def to_json(*a)
- hash = OrderedHash.new
+ hash = BSON::OrderedHash.new
hash[:id] = oid
hash[:name] = self.name
hash[:children] = self.children
hash[:data] = self.data
hash.to_json(*a)
\ No newline at end of file