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.
54 55 56 |
# File 'lib/ovirtsdk4/service.rb', line 54 def inspect "#<#{self.class.name}:#{@request.method} #{@request.url}>" end |
#to_s ⇒ String
Returns a string representation of the future.
63 64 65 |
# File 'lib/ovirtsdk4/service.rb', line 63 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 |
# 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 |