rubyx/lib/sof/hash.rb
2014-08-18 12:49:38 +03:00

12 lines
235 B
Ruby

Hash.class_eval do
def to_sof_node(writer , level)
node = Sof::HashNode.new()
each do |key , object|
k = writer.to_sof_node( key )
v = writer.to_sof_node( object )
node.add(k , v)
end
node
end
end