rubyx-debugger/lib/class_view.rb

15 lines
300 B
Ruby
Raw Normal View History

class ClassView < ElementView
def initialize clazz
@clazz = clazz
2015-08-20 00:53:20 +02:00
end
2015-08-20 14:48:45 +02:00
def draw
@element = div("li")
add( "a" , @clazz.name ) << (ul = div("ul"))
@clazz.object_layout.object_instance_names.each do |name|
ul << (div("li") << div("a", name ))
2015-08-20 14:48:45 +02:00
end
@element
2015-08-20 14:48:45 +02:00
end
2015-08-20 00:53:20 +02:00
end