got vm to boot and classes to show

This commit is contained in:
Torsten Ruger 2015-07-22 23:08:36 +03:00
parent 3d96d59371
commit 398d364c02
3 changed files with 28 additions and 16 deletions

View File

@ -4,11 +4,10 @@ class ClassView
required_param :classes, type: Hash
def render
div class: "row" do
classes.each do |k , clas|
div :class => "col-md-1" do
k.span
clas.span
div :class => "row" do
classes.each do |name , clas|
div :class => "row" do
clas.name.span
end
end
end

View File

@ -1,13 +1,17 @@
require 'opal'
require 'opal-jquery'
require "opal/parser"
require "json"
require 'opal-react'
require "salama"
require "class_view"
require "register_view"
require "source_view"
require "block_view"
Virtual.machine.boot
Document.ready? do # Document.ready? is a opal-jquery method.
React.render( React.create_element( Debugger), Element['#content'] )
end
@ -29,8 +33,12 @@ class Debugger
# end
def render
div do
ClassView classes: { :class1 => "Object"}
div :class => "container" do
div :class => :row do
div :class => "col-md-1" do
ClassView classes: Virtual.machine.space.classes
end
div :class => "col-md-11" do
div :class => "row" do
div :class => "col-md-4" do
"Future one"
@ -45,4 +53,7 @@ class Debugger
RegisterView registers: ["r1" , "r2"]
end
end
end
end
end

View File

@ -1,6 +1,8 @@
# config.ru
require 'bundler'
Bundler.require
Opal.use_gem "salama"
Opal.use_gem "salama-arm"
require "react/source"