Class: OvirtSDK4::Future
- Inherits:
-
Object
- Object
- OvirtSDK4::Future
- Defined in:
- lib/ovirtsdk4/service.rb
Overview
Instances of this class are returned for operatoins that specify the wait: false
parameter.
Instance Method Summary collapse
-
#inspect ⇒ String
Returns a string representation of the future.
-
#to_s ⇒ String
Returns a string representation of the future.
-
#wait ⇒ Object
Waits till the result of the operation that created this future is available.
Instance Method Details
#inspect ⇒ String
Returns a string representation of the future.
55 56 57 |
# File 'lib/ovirtsdk4/service.rb', line 55 def inspect "#<#{self.class.name}:#{@request.method} #{@request.url}>" end |
#to_s ⇒ String
Returns a string representation of the future.
64 65 66 |
# File 'lib/ovirtsdk4/service.rb', line 64 def to_s inspect end |
#wait ⇒ Object
Waits till the result of the operation that created this future is available.
43 44 45 46 47 48 |
# File 'lib/ovirtsdk4/service.rb', line 43 def wait response = @service.connection.wait(@request) raise response if response.is_a?(Exception) @block.call(response) end |