Class: OvirtSDK4::ProbeResult

Inherits:
Object
  • Object
show all
Defined in:
lib/ovirtsdk4/probe.rb

Overview

The probe returns an array of instances of this class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ ProbeResult

This method is used to initialize a class instance,

Parameters:

  • opts (Hash)

    The attributes of the result.

Options Hash (opts):

  • :version (String)

    The version obtained as the result of the probe.



302
303
304
# File 'lib/ovirtsdk4/probe.rb', line 302

def initialize(opts)
  @version = opts[:version]
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



293
294
295
# File 'lib/ovirtsdk4/probe.rb', line 293

def version
  @version
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

Override the comparison method.



307
308
309
# File 'lib/ovirtsdk4/probe.rb', line 307

def ==(other)
  other.class == self.class && other.state == state
end

#hashObject

Should always be overriden if one overrides ==, used to get a hash value for the object.



315
316
317
# File 'lib/ovirtsdk4/probe.rb', line 315

def hash
  state.hash
end