Class: Wary::LoadMeter

Inherits:
Object
  • Object
show all
Defined in:
lib/wary/load_meter.rb

Defined Under Namespace

Classes: MeasurementFailed

Instance Method Summary collapse

Constructor Details

#initialize(shell = nil) ⇒ LoadMeter

Returns a new instance of LoadMeter.



7
8
9
# File 'lib/wary/load_meter.rb', line 7

def initialize(shell = nil)
  @shell = shell || Utils::Shell.new
end

Instance Method Details

#loadObject



11
12
13
# File 'lib/wary/load_meter.rb', line 11

def load
  raw_load_avg_last_min.sub(',', '.').to_f
end