rubyx-debugger/app/register_view.rb

26 lines
481 B
Ruby
Raw Normal View History

2015-07-22 15:22:54 +02:00
class RegisterView
include React::Component
2015-07-23 19:08:40 +02:00
required_param :interpreter
define_state :registers
before_mount do
interpreter.register_event(:register_changed, self)
registers! interpreter.registers
end
def register_changed reg , old , bl
registers! interpreter.registers
end
2015-07-22 15:22:54 +02:00
def render
2015-07-22 21:05:31 +02:00
div :class => :row do
registers.each do |r , has|
2015-07-22 21:05:31 +02:00
div :class => "col-md-1" do
2015-07-23 12:20:53 +02:00
"#{r} : #{has}"
2015-07-22 15:22:54 +02:00
end
end
end
end
end