Class: Shoes::Timer
- Inherits:
-
Object
- Object
- Shoes::Timer
- Includes:
- Common::Inspect
- Defined in:
- shoes-core/lib/shoes/timer.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#gui ⇒ Object
readonly
Returns the value of attribute gui.
-
#n ⇒ Object
readonly
Returns the value of attribute n.
Instance Method Summary collapse
-
#initialize(app, n = 1000, &blk) ⇒ Timer
constructor
A new instance of Timer.
Methods included from Common::Inspect
Constructor Details
#initialize(app, n = 1000, &blk) ⇒ Timer
Returns a new instance of Timer.
7 8 9 10 11 12 |
# File 'shoes-core/lib/shoes/timer.rb', line 7 def initialize(app, n = 1000, &blk) @app = app @n = n @blk = @app.current_slot.create_bound_block(blk) @gui = Shoes.backend_for(self, @blk) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
14 15 16 |
# File 'shoes-core/lib/shoes/timer.rb', line 14 def app @app end |
#gui ⇒ Object (readonly)
Returns the value of attribute gui.
14 15 16 |
# File 'shoes-core/lib/shoes/timer.rb', line 14 def gui @gui end |
#n ⇒ Object (readonly)
Returns the value of attribute n.
14 15 16 |
# File 'shoes-core/lib/shoes/timer.rb', line 14 def n @n end |