Class: Vidibus::Sysinfo::Cpu::Result
- Defined in:
- lib/vidibus/sysinfo/cpu.rb
Constant Summary collapse
- KEYS =
{ usr: :user, user: :user, nice: :nice, sys: :system, system: :system, iowait: :iowait, irq: :irq, soft: :soft, steal: :steal, guest: :guest, idle: :idle }
Instance Method Summary collapse
Methods inherited from Result
#[], attrs, #initialize, #to_h
Methods included from Helper
Constructor Details
This class inherits a constructor from Vidibus::Sysinfo::Result
Instance Method Details
#to_f ⇒ Object
35 36 37 |
# File 'lib/vidibus/sysinfo/cpu.rb', line 35 def to_f used end |
#to_i ⇒ Object
31 32 33 |
# File 'lib/vidibus/sysinfo/cpu.rb', line 31 def to_i round(used, 0).to_i end |