class Perus::Pinger::Value
Public Instance Methods
run()
click to toggle source
# File lib/perus/pinger/metrics/value.rb, line 12 def run grep = options.grep.gsub('"', '\\"') line = shell(%Q[cat #{options.path} | egrep "#{grep}"]) value = line.match(Regexp.compile(options.grep))[1] {options.name => value} end