Class: Shoes::Timer
Instance Method Summary collapse
-
#initialize(app, n = 1000, &blk) ⇒ Timer
constructor
A new instance of Timer.
- #run ⇒ Object
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
#run ⇒ Object
42 43 44 45 |
# File 'lib/shoes/anim.rb', line 42 def run @blk.call @app.flush end |