rubyx-debugger/app/instruction_view.rb
Torsten Ruger 557c455167 switch to susy
a rewire basically, but much clearer
2015-07-27 21:29:41 +03:00

29 lines
443 B
Ruby

class InstructionView
include React::Component
required_param :interpreter
required_param :instruction
define_state :active => ""
before_mount do
check_active interpreter.instruction
end
def check_active i
active! instruction == i ? "bright" : ""
end
def instruction_changed old , ins
check_active ins
end
def render
div :class => active do
instruction.to_s if instruction
end
end
end