Class: OvirtSDK4::RngDevice
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ RngDevice
constructor
Creates a new instance of the RngDevice class.
-
#rate ⇒ Rate
Returns the value of the
rate
attribute. -
#rate=(value) ⇒ Object
Sets the value of the
rate
attribute. -
#source ⇒ RngSource
Returns the value of the
source
attribute. -
#source=(value) ⇒ Object
Sets the value of the
source
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ RngDevice
Creates a new instance of the OvirtSDK4::RngDevice class.
18436 18437 18438 18439 18440 |
# File 'lib/ovirtsdk4/types.rb', line 18436 def initialize(opts = {}) super(opts) self.rate = opts[:rate] self.source = opts[:source] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
18445 18446 18447 18448 18449 |
# File 'lib/ovirtsdk4/types.rb', line 18445 def ==(other) super && @rate == other.rate && @source == other.source end |
#hash ⇒ Object
Generates a hash value for this object.
18454 18455 18456 18457 18458 |
# File 'lib/ovirtsdk4/types.rb', line 18454 def hash super + @rate.hash + @source.hash end |
#rate ⇒ Rate
Returns the value of the rate
attribute.
18386 18387 18388 |
# File 'lib/ovirtsdk4/types.rb', line 18386 def rate @rate end |
#rate=(value) ⇒ Object
Sets the value of the rate
attribute.
The value
parameter can be an instance of OvirtSDK4::Rate or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
18399 18400 18401 18402 18403 18404 |
# File 'lib/ovirtsdk4/types.rb', line 18399 def rate=(value) if value.is_a?(Hash) value = Rate.new(value) end @rate = value end |
#source ⇒ RngSource
Returns the value of the source
attribute.
18411 18412 18413 |
# File 'lib/ovirtsdk4/types.rb', line 18411 def source @source end |
#source=(value) ⇒ Object
Sets the value of the source
attribute.
18420 18421 18422 |
# File 'lib/ovirtsdk4/types.rb', line 18420 def source=(value) @source = value end |