actually using volotile attributes and outputting sof in test. very readable

This commit is contained in:
Torsten Ruger
2014-08-18 17:16:18 +03:00
parent a594b716bc
commit 81f8f0f3a2
4 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
module Sof
class Volotile
@@mapping = {
Virtual::MethodDefinition => []
Virtual::MethodDefinition => [:current]
}
def self.attributes clazz
@@mapping[clazz] || []

View File

@ -38,7 +38,7 @@ module Sof
hash
end
immediate , extended = atts.partition {|a,val| val.is_a?(SimpleNode) }
head += immediate.collect {|a,val| "#{a}: #{val.data}"}.join(", ") + ")"
head += immediate.collect {|a,val| "#{a.to_sof()} => #{val.data}"}.join(", ") + ")"
node = ObjectNode.new(head , ref)
extended.each do |a , val|
node.add( to_sof_node(a,level + 1) , val )