fixes object
This commit is contained in:
parent
a10321922e
commit
7f7a174554
@ -29,7 +29,7 @@ module Sof
|
|||||||
head = object.class.name + "("
|
head = object.class.name + "("
|
||||||
attributes = attributes_for(object)
|
attributes = attributes_for(object)
|
||||||
immediate , extended = attributes.partition {|a| is_value?(get_value(object , a) ) }
|
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)
|
node = Node.new(head)
|
||||||
extended.each do |a|
|
extended.each do |a|
|
||||||
|
@ -3,11 +3,11 @@ require "yaml"
|
|||||||
|
|
||||||
class ObjectWithAttributes
|
class ObjectWithAttributes
|
||||||
def initialize
|
def initialize
|
||||||
@name = "some object"
|
@name = "some name"
|
||||||
@number = 1234
|
@number = 1234
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
OBJECT_STRING = "ObjectWithAttributes(name: 'some object' ,number: 1234)"
|
OBJECT_STRING = "ObjectWithAttributes(name: 'some name', number: 1234)"
|
||||||
|
|
||||||
class BasicSof < MiniTest::Test
|
class BasicSof < MiniTest::Test
|
||||||
def test_true
|
def test_true
|
||||||
|
Loading…
Reference in New Issue
Block a user