Class: OsVm::MachineConfig::Cpu
- Inherits:
-
Object
- Object
- OsVm::MachineConfig::Cpu
- Defined in:
- lib/osvm/machine_config.rb
Instance Attribute Summary collapse
- #cores ⇒ Integer readonly
- #sockets ⇒ Integer readonly
- #threads ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(cfg) ⇒ Cpu
constructor
A new instance of Cpu.
Constructor Details
#initialize(cfg) ⇒ Cpu
Returns a new instance of Cpu.
16 17 18 19 20 |
# File 'lib/osvm/machine_config.rb', line 16 def initialize(cfg) @cores = cfg.fetch(:cores) @threads = cfg.fetch(:threads) @sockets = cfg.fetch(:sockets) end |
Instance Attribute Details
#cores ⇒ Integer (readonly)
8 9 10 |
# File 'lib/osvm/machine_config.rb', line 8 def cores @cores end |
#sockets ⇒ Integer (readonly)
14 15 16 |
# File 'lib/osvm/machine_config.rb', line 14 def sockets @sockets end |
#threads ⇒ Integer (readonly)
11 12 13 |
# File 'lib/osvm/machine_config.rb', line 11 def threads @threads end |