Module: YuiRestClient::Waitable
- Included in:
- YuiRestClient::Widgets::Base
- Defined in:
- lib/yui_rest_client/waitable.rb
Instance Method Summary collapse
-
#wait_until(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) ⇒ Waitable
Waits until the block evaluation will return true, raises Error::TimeoutError on timeout.
-
#wait_while(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) ⇒ Waitable
Waits while the block evaluation returns true, raises Error::TimeoutError on timeout.
Instance Method Details
#wait_until(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) ⇒ Waitable
Waits until the block evaluation will return true, raises Error::TimeoutError on timeout.
13 14 15 16 17 18 19 20 |
# File 'lib/yui_rest_client/waitable.rb', line 13 def wait_until(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) @timeout = timeout @interval = interval Wait.until(timeout: timeout, interval: interval, message: , object: self, &block) @timeout = YuiRestClient.timeout @interval = YuiRestClient.interval self end |
#wait_while(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) ⇒ Waitable
Waits while the block evaluation returns true, raises Error::TimeoutError on timeout.
30 31 32 33 34 35 36 37 |
# File 'lib/yui_rest_client/waitable.rb', line 30 def wait_while(timeout: YuiRestClient.timeout, interval: YuiRestClient.interval, message: nil, &block) @timeout = timeout @interval = interval Wait.while(timeout: timeout, interval: interval, message: , object: self, &block) @timeout = YuiRestClient.timeout @interval = YuiRestClient.interval self end |