get sod to output lists and dicts

This commit is contained in:
Torsten Ruger
2015-05-20 10:57:20 +03:00
parent 6f46f54714
commit 06cfba7c58
3 changed files with 31 additions and 7 deletions

View File

@ -43,11 +43,23 @@ module Parfait
old_length = old_length + 1
end
end
end
class Parfait::Class
def to_s
Sof::Writer.write(self)
end
end
class Parfait::List
def to_sof_node(writer , level , ref )
Sof.array_to_sof_node(self , writer , level , ref )
end
end
class Dictionary
def to_sof_node(writer , level , ref)
Sof.hash_to_sof_node( self , writer , level , ref)
end
end
Word.class_eval do
def to_s