made a simple node for small objects. bad news is that tests pass unchanged
This commit is contained in:
parent
8ff55fdb1f
commit
d401327319
@ -42,6 +42,7 @@ module Sof
|
||||
end
|
||||
immediate , extended = atts.partition {|a,val| val.is_a?(SimpleNode) }
|
||||
head += immediate.collect {|a,val| "#{a.to_sof()} => #{val.data}"}.join(", ") + ")"
|
||||
return SimpleNode.new(head) if( ref.nil? and extended.empty? and head.length < 30 )
|
||||
node = ObjectNode.new(head , ref)
|
||||
extended.each do |a , val|
|
||||
node.add( to_sof_node(a,level + 1) , val )
|
||||
|
Loading…
Reference in New Issue
Block a user