Module: Pausable

Included in:
Retest::Program
Defined in:
lib/retest/program/pausable.rb

Instance Method Summary collapse

Instance Method Details

#initialize_pause(value = false) ⇒ Object



2
3
4
# File 'lib/retest/program/pausable.rb', line 2

def initialize_pause(value = false)
  @paused = value
end

#pauseObject



6
7
8
# File 'lib/retest/program/pausable.rb', line 6

def pause
  @paused = true
end

#paused?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/retest/program/pausable.rb', line 10

def paused?
  @paused
end

#resumeObject



14
15
16
# File 'lib/retest/program/pausable.rb', line 14

def resume
  @paused = false
end

#running_stateObject



18
19
20
# File 'lib/retest/program/pausable.rb', line 18

def running_state
  @paused
end