Class: Waiting::Waiter

Inherits:
Object
  • Object
show all
Defined in:
lib/waiting/waiter.rb

Instance Method Summary collapse

Constructor Details

#initializeWaiter

Waiter is in waiting state to start with



4
5
6
# File 'lib/waiting/waiter.rb', line 4

def initialize
  @done = false
end

Instance Method Details

#doneObject

Mark the waiter as done



9
10
11
# File 'lib/waiting/waiter.rb', line 9

def done
  @done = true
end

#done?Boolean

Is the waiter done?

Returns:

  • (Boolean)

    if the waiter is done



15
16
17
# File 'lib/waiting/waiter.rb', line 15

def done?
  @done
end