# File lib/god/conditions/file_mtime.rb, line 20 def test (Time.now - File.mtime(self.path)) > self.max_age end
# File lib/god/conditions/file_mtime.rb, line 13 def valid? valid = true valid &= complain("Attribute 'path' must be specified", self) if self.path.nil? valid &= complain("Attribute 'max_age' must be specified", self) if self.max_age.nil? valid end
# File lib/god/conditions/file_mtime.rb, line 7 def initialize super self.path = nil self.max_age = nil end