ad a preliminary syntax for class objects, which is just the class name
This commit is contained in:
parent
a7dc60e638
commit
52ca7110c3
@ -31,6 +31,9 @@ module Sof
|
||||
end
|
||||
|
||||
def object_sof_node( object , level , ref)
|
||||
if( object.is_a? Class )
|
||||
return SimpleNode.new( object.name )
|
||||
end
|
||||
head = object.class.name + "("
|
||||
atts = attributes_for(object).inject({}) do |hash , a|
|
||||
val = get_value(object , a)
|
||||
|
@ -86,4 +86,8 @@ class BasicSof < MiniTest::Test
|
||||
@out = Sof::Writer.write(object)
|
||||
check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)"
|
||||
end
|
||||
def test_class
|
||||
@out = Sof::Writer.write(ObjectWithAttributes)
|
||||
check "ObjectWithAttributes"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user