Class: OvirtSDK4::CpuTopology
- 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. -
#cores ⇒ Integer
Returns the value of the
cores
attribute. -
#cores=(value) ⇒ Object
Sets the value of the
cores
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ CpuTopology
constructor
Creates a new instance of the CpuTopology class.
-
#sockets ⇒ Integer
Returns the value of the
sockets
attribute. -
#sockets=(value) ⇒ Object
Sets the value of the
sockets
attribute. -
#threads ⇒ Integer
Returns the value of the
threads
attribute. -
#threads=(value) ⇒ Object
Sets the value of the
threads
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CpuTopology
Creates a new instance of the OvirtSDK4::CpuTopology class.
2541 2542 2543 2544 2545 2546 |
# File 'lib/ovirtsdk4/types.rb', line 2541 def initialize(opts = {}) super(opts) self.cores = opts[:cores] self.sockets = opts[:sockets] self.threads = opts[:threads] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
2551 2552 2553 2554 2555 2556 |
# File 'lib/ovirtsdk4/types.rb', line 2551 def ==(other) super && @cores == other.cores && @sockets == other.sockets && @threads == other.threads end |
#cores ⇒ Integer
Returns the value of the cores
attribute.
2478 2479 2480 |
# File 'lib/ovirtsdk4/types.rb', line 2478 def cores @cores end |
#cores=(value) ⇒ Object
Sets the value of the cores
attribute.
2487 2488 2489 |
# File 'lib/ovirtsdk4/types.rb', line 2487 def cores=(value) @cores = value end |
#hash ⇒ Object
Generates a hash value for this object.
2561 2562 2563 2564 2565 2566 |
# File 'lib/ovirtsdk4/types.rb', line 2561 def hash super + @cores.hash + @sockets.hash + @threads.hash end |
#sockets ⇒ Integer
Returns the value of the sockets
attribute.
2496 2497 2498 |
# File 'lib/ovirtsdk4/types.rb', line 2496 def sockets @sockets end |
#sockets=(value) ⇒ Object
Sets the value of the sockets
attribute.
2505 2506 2507 |
# File 'lib/ovirtsdk4/types.rb', line 2505 def sockets=(value) @sockets = value end |
#threads ⇒ Integer
Returns the value of the threads
attribute.
2514 2515 2516 |
# File 'lib/ovirtsdk4/types.rb', line 2514 def threads @threads end |
#threads=(value) ⇒ Object
Sets the value of the threads
attribute.
2523 2524 2525 |
# File 'lib/ovirtsdk4/types.rb', line 2523 def threads=(value) @threads = value end |