From aa2303ddaa0f1a204c6b2cfec07f4881ef995e42 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 23 Jul 2015 13:15:44 +0300 Subject: [PATCH] add lib and interpreter skeleton --- config.ru | 1 + lib/interpreter.rb | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 lib/interpreter.rb diff --git a/config.ru b/config.ru index bf54dd0..8c5991f 100644 --- a/config.ru +++ b/config.ru @@ -9,6 +9,7 @@ require "react/source" run Opal::Server.new {|s| s.append_path 'app' + s.append_path 'lib' s.append_path File.dirname(::React::Source.bundled_path_for("react-with-addons.js")) s.main = 'debugger' s.debug = true diff --git a/lib/interpreter.rb b/lib/interpreter.rb new file mode 100644 index 0000000..0543bad --- /dev/null +++ b/lib/interpreter.rb @@ -0,0 +1,10 @@ + +class Interpreter + + attr_accessor :instruction + attr_accessor :registers + + def initialize + @registers = (0...12).collect{|i| "r#{i}"} + end +end