rubyx-debugger/app/main/models/blocks_model.rb
2015-07-30 15:05:57 +03:00

11 lines
281 B
Ruby

class BlocksModel < Volt::ArrayModel
def instruction_changed old , ins
self.last._class_name = "inactive" if( self.length > 0)
self << { :name => ins.to_s , :class_name => "bright" }
#puts "block #{self.length}"
self.delete_at(0) if( self.length > 5)
end
end