Class: Shoes::Timer

Inherits:
Object show all
Defined in:
lib/shoes/anim.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, n = 1000, &blk) ⇒ Timer

Returns a new instance of Timer.



38
39
40
# File 'lib/shoes/anim.rb', line 38

def initialize app, n=1000, &blk
  @app, @n, @blk = app, n, blk
end

Instance Method Details

#runObject



42
43
44
45
# File 'lib/shoes/anim.rb', line 42

def run
  @blk.call
  @app.flush
end