simpler but more verbose node model fixes everything but one

This commit is contained in:
Torsten Ruger
2014-08-18 08:19:48 +03:00
parent b0472753f4
commit a3c9ab7e29
5 changed files with 90 additions and 57 deletions

View File

@@ -30,13 +30,11 @@ module Sof
attributes = attributes_for(object)
immediate , extended = attributes.partition {|a| is_value?(get_value(object , a) ) }
head += immediate.collect {|a| "#{a}: #{get_value(object , a).to_sof()}"}.join(", ") + ")"
ex = {}
node = ObjectNode.new(head)
extended.each do |a|
val = get_value(object , a)
ex[a] = val
node.add( write.to_sof_node(a) , writer.to_sof_node(val) )
end
node = ex.to_sof_node(self,level+1)
node.data = head
node
end