Sha256: 8efa35fc0588f45448de58a25619c435a687586da979cb30bc3627a188493550
Contents?: true
Size: 435 Bytes
Versions: 13
Compression:
Stored size: 435 Bytes
Contents
class Eye::Checker::FileCTime < Eye::Checker # Check that file changes (log for example) # check :ctime, :every => 5.seconds, :file => "/tmp/1.log", :times => [3,5] param :file, [String], true def get_value File.ctime(file) rescue nil end def human_value(value) if value == nil 'Err' else value.strftime('%H:%M') end end def good?(value) value.to_i > previous_value.to_i end end
Version data entries
13 entries across 13 versions & 3 rubygems