From 7f7a1745549a0d15f1d60b3d38fcf947d025ac7d Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 16 Aug 2014 09:56:11 +0300 Subject: [PATCH] fixes object --- lib/sof/writer.rb | 2 +- test/sof.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sof/writer.rb b/lib/sof/writer.rb index 666eff96..e749fbbf 100644 --- a/lib/sof/writer.rb +++ b/lib/sof/writer.rb @@ -29,7 +29,7 @@ module Sof head = object.class.name + "(" attributes = attributes_for(object) immediate , extended = attributes.partition {|a| is_value?(get_value(object , a) ) } - head += immediate.collect {|a| "#{a}: #{get_value(object , a)}"}.join(", ") + ")" + head += immediate.collect {|a| "#{a}: #{get_value(object , a).to_sof()}"}.join(", ") + ")" node = Node.new(head) extended.each do |a| diff --git a/test/sof.rb b/test/sof.rb index 6b4049c9..c6b1c476 100644 --- a/test/sof.rb +++ b/test/sof.rb @@ -3,11 +3,11 @@ require "yaml" class ObjectWithAttributes def initialize - @name = "some object" + @name = "some name" @number = 1234 end end -OBJECT_STRING = "ObjectWithAttributes(name: 'some object' ,number: 1234)" +OBJECT_STRING = "ObjectWithAttributes(name: 'some name', number: 1234)" class BasicSof < MiniTest::Test def test_true