Class: OvirtSDK4::CpuTune
- 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 = {}) ⇒ CpuTune
constructor
Creates a new instance of the CpuTune class.
-
#vcpu_pins ⇒ Array<VcpuPin>
Returns the value of the
vcpu_pins
attribute. -
#vcpu_pins=(list) ⇒ Object
Sets the value of the
vcpu_pins
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CpuTune
Creates a new instance of the OvirtSDK4::CpuTune class.
2558 2559 2560 2561 |
# File 'lib/ovirtsdk4/types.rb', line 2558 def initialize(opts = {}) super(opts) self.vcpu_pins = opts[:vcpu_pins] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
2566 2567 2568 2569 |
# File 'lib/ovirtsdk4/types.rb', line 2566 def ==(other) super && @vcpu_pins == other.vcpu_pins end |
#hash ⇒ Object
Generates a hash value for this object.
2574 2575 2576 2577 |
# File 'lib/ovirtsdk4/types.rb', line 2574 def hash super + @vcpu_pins.hash end |
#vcpu_pins ⇒ Array<VcpuPin>
Returns the value of the vcpu_pins
attribute.
2527 2528 2529 |
# File 'lib/ovirtsdk4/types.rb', line 2527 def vcpu_pins @vcpu_pins end |
#vcpu_pins=(list) ⇒ Object
Sets the value of the vcpu_pins
attribute.
2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 |
# File 'lib/ovirtsdk4/types.rb', line 2536 def vcpu_pins=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = VcpuPin.new(value) end end end @vcpu_pins = list end |