Module: Topaz::Pausable
- Included in:
- MIDIClockInput, Timer
- Defined in:
- lib/topaz/pausable.rb
Overview
Pause functionality
Instance Method Summary collapse
-
#pause ⇒ Boolean
Pause the clock.
-
#paused? ⇒ Boolean
(also: #pause?)
Is this clock paused?.
-
#toggle_pause ⇒ Boolean
Toggle pausing the clock.
-
#unpause ⇒ Boolean
Unpause the clock.
Instance Method Details
#pause ⇒ Boolean
Pause the clock
8 9 10 |
# File 'lib/topaz/pausable.rb', line 8 def pause @pause = true end |
#paused? ⇒ Boolean Also known as: pause?
Is this clock paused?
20 21 22 |
# File 'lib/topaz/pausable.rb', line 20 def paused? @pause end |
#toggle_pause ⇒ Boolean
Toggle pausing the clock
27 28 29 |
# File 'lib/topaz/pausable.rb', line 27 def toggle_pause @pause = !@pause end |
#unpause ⇒ Boolean
Unpause the clock
14 15 16 |
# File 'lib/topaz/pausable.rb', line 14 def unpause @pause = false end |