class Bluepill::ProcessConditions::FileTime
Public Class Methods
new(options = {})
click to toggle source
# File lib/bluepill/process_conditions/file_time.rb, line 4 def initialize(options = {}) @below = options[:below] @filename = options[:filename] end
Public Instance Methods
check(value)
click to toggle source
# File lib/bluepill/process_conditions/file_time.rb, line 15 def check(value) return false if value.nil? value < @below end
run(_pid, _include_children)
click to toggle source
# File lib/bluepill/process_conditions/file_time.rb, line 9 def run(_pid, _include_children) Time.now - File.mtime(@filename) if File.exist?(@filename) rescue $ERROR_INFO end