Class: Shoes::Timer

Inherits:
Object
  • Object
show all
Includes:
Common::Inspect
Defined in:
shoes-core/lib/shoes/timer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common::Inspect

#inspect, #to_s

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

#appObject (readonly)

Returns the value of attribute app


14
15
16
# File 'shoes-core/lib/shoes/timer.rb', line 14

def app
  @app
end

#guiObject (readonly)

Returns the value of attribute gui


14
15
16
# File 'shoes-core/lib/shoes/timer.rb', line 14

def gui
  @gui
end

#nObject (readonly)

Returns the value of attribute n


14
15
16
# File 'shoes-core/lib/shoes/timer.rb', line 14

def n
  @n
end