class Autorespawn::Watch
Functionality to watch a program for change
Attributes
current_state[R]
@return [ProgramID] the reference state
Public Class Methods
new(current_state)
click to toggle source
# File lib/autorespawn/watch.rb, line 7 def initialize(current_state) @current_state = current_state end
Public Instance Methods
wait()
click to toggle source
Wait for changes
# File lib/autorespawn/watch.rb, line 12 def wait loop do if current_state.changed? return end sleep 1 end end