Class: Vapir::Waiter

Inherits:
Object
  • Object
show all
Extended by:
WaitUntil
Includes:
WaitUntil
Defined in:
lib/vapir-common/waiter.rb

Overview

:nodoc:all

Defined Under Namespace

Modules: WaitUntil

Constant Summary collapse

@@default_polling_interval =
0.5
@@default_timeout =
60.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WaitUntil

wait_until

Constructor Details

#initialize(timeout = @@default_timeout, polling_interval = @@default_polling_interval) ⇒ Waiter

Returns a new instance of Waiter.



15
16
17
18
# File 'lib/vapir-common/waiter.rb', line 15

def initialize(timeout=@@default_timeout, polling_interval=@@default_polling_interval)
  @timeout = timeout
  @polling_interval = polling_interval
end

Instance Attribute Details

#polling_intervalObject

How long to wait between each iteration through the wait_until loop. In seconds.



7
8
9
# File 'lib/vapir-common/waiter.rb', line 7

def polling_interval
  @polling_interval
end

#timeoutObject

Timeout for wait_until.



10
11
12
# File 'lib/vapir-common/waiter.rb', line 10

def timeout
  @timeout
end