Refresh

This website rubydoc.info/gems/ovirt-engine-sdk/OvirtSDK4/Future is currently offline. Cloudflare\'s Always Online™ shows a snapshot of this web page from the Internet Archive\'s Wayback Machine. To check for the live version, click Refresh.

Class: OvirtSDK4::Future

Inherits:
Object
  • Object
show all
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

Instance Method Details

#inspect ⇒ String

Returns a string representation of the future.

Returns:

  • (String) —

    The string representation.



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.

Returns:

  • (String) —

    The string representation.



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.

Returns:

  • (Object) —

    The result of the operation that created this future.



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