2014-08-15 16:14:49 +02:00
|
|
|
Hash.class_eval do
|
2014-08-15 21:29:48 +02:00
|
|
|
def to_sof_node(members , level)
|
2014-08-15 16:14:49 +02:00
|
|
|
each_with_index do |pair , i|
|
|
|
|
key , object = pair
|
|
|
|
io.write(" " * level) unless i == 0
|
|
|
|
io.write "-"
|
|
|
|
members.output( io , key)
|
|
|
|
io.write( " " )
|
|
|
|
members.output( io , object)
|
|
|
|
io.write("\n")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|