rubyx-debugger/app/main/models/blocks_model.rb

11 lines
280 B
Ruby
Raw Normal View History

2015-07-30 09:09:04 +02:00
class BlocksModel < Volt::ArrayModel
def instruction_changed old , ins
2015-07-30 09:27:27 +02:00
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)
2015-07-30 09:09:04 +02:00
end
end