Class: OsVm::MachineConfig::Cpu

Inherits:
Object
  • Object
show all
Defined in:
lib/osvm/machine_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#coresInteger (readonly)

Returns:

  • (Integer)


8
9
10
# File 'lib/osvm/machine_config.rb', line 8

def cores
  @cores
end

#socketsInteger (readonly)

Returns:

  • (Integer)


14
15
16
# File 'lib/osvm/machine_config.rb', line 14

def sockets
  @sockets
end

#threadsInteger (readonly)

Returns:

  • (Integer)


11
12
13
# File 'lib/osvm/machine_config.rb', line 11

def threads
  @threads
end