Sha256: 3c1bbd2bcd290590836a0028c6b876dd131b893a7148c0712ecc398a895c6b6c
Contents?: true
Size: 531 Bytes
Versions: 9
Compression:
Stored size: 531 Bytes
Contents
# -*- encoding: utf-8 -*- module Bluepill module ProcessConditions class FileTime < ProcessCondition def initialize(options = {}) @below = options[:below] @filename = options[:filename] end def run(pid, include_children) if File.exists?(@filename) Time.now()-File::mtime(@filename) else nil end rescue $! end def check(value) return false if value.nil? return value < @below end end end end
Version data entries
9 entries across 9 versions & 2 rubygems