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 required_param :classes, type: Hash
def render def render
div class: "row" do div :class => "row" do
classes.each do |k , clas| classes.each do |name , clas|
div :class => "col-md-1" do div :class => "row" do
k.span clas.name.span
clas.span
end end
end end
end end

View File

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

View File

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