Class: Shoes::Swt::Timer
- Inherits:
-
Object
- Object
- Shoes::Swt::Timer
- Defined in:
- shoes-swt/lib/shoes/swt/timer.rb
Instance Method Summary collapse
- #eval_block ⇒ Object
-
#initialize(dsl, app, blk) ⇒ Timer
constructor
A new instance of Timer.
Constructor Details
#initialize(dsl, app, blk) ⇒ Timer
Returns a new instance of Timer.
6 7 8 9 10 11 12 |
# File 'shoes-swt/lib/shoes/swt/timer.rb', line 6 def initialize(dsl, app, blk) @blk = blk task = proc do eval_block unless app.real.disposed? end ::Swt.display.timer_exec(dsl.n, task) end |
Instance Method Details
#eval_block ⇒ Object
14 15 16 |
# File 'shoes-swt/lib/shoes/swt/timer.rb', line 14 def eval_block @blk.call end |