rubyx-debugger/app/main/controllers/classes_controller.rb

29 lines
669 B
Ruby
Raw Normal View History

2015-07-31 18:35:06 +02:00
module Main
class ClassesController < Volt::ModelController
def initialize *args
super(*args)
page._classes!.clear
2015-08-10 21:29:49 +02:00
all = []
2015-07-31 18:35:06 +02:00
Virtual.machine.space.classes.each do |name , claz|
next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name
2015-08-10 21:29:49 +02:00
all << name
end
all.sort.each do |name|
2015-07-31 18:35:06 +02:00
c = Volt::Model.new :name => name
page._classes << c
end
end
2015-08-10 21:29:49 +02:00
def variables(clas_model)
layout = Virtual.machine.space.get_class_by_name(clas_model._name).object_layout
2015-08-10 21:29:49 +02:00
vars = []
layout.object_instance_names.each do |name|
vars.push name
2015-08-10 21:29:49 +02:00
end
vars
end
2015-07-31 18:35:06 +02:00
end
end