diff --git a/app/main/controllers/classes_controller.rb b/app/main/controllers/classes_controller.rb new file mode 100644 index 0000000..f4c530c --- /dev/null +++ b/app/main/controllers/classes_controller.rb @@ -0,0 +1,16 @@ +module Main + class ClassesController < Volt::ModelController + + def initialize *args + super(*args) + + page._classes!.clear + Virtual.machine.space.classes.each do |name , claz| + next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name + c = Volt::Model.new :name => name + page._classes << c + end + end + + end +end diff --git a/app/main/controllers/main_controller.rb b/app/main/controllers/main_controller.rb index 8b4d5a6..3bd9fd8 100644 --- a/app/main/controllers/main_controller.rb +++ b/app/main/controllers/main_controller.rb @@ -14,7 +14,6 @@ module Main def index init_machine - init_classes init_blocks init_source end @@ -34,14 +33,6 @@ module Main @volt_app.interpreter.start machine.init end - def init_classes - page._classes!.clear - Virtual.machine.space.classes.each do |name , claz| - next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name - c = Volt::Model.new :name => name - page._classes << c - end - end def init_blocks blocks = BlocksModel.new page._blocks = blocks diff --git a/app/main/views/classes/index.html b/app/main/views/classes/index.html new file mode 100644 index 0000000..309bb69 --- /dev/null +++ b/app/main/views/classes/index.html @@ -0,0 +1,12 @@ +<:Title> + classes index + +<:Body> +