Sha256: ec295e8f57f50b9b3d4dd1914155c0c485185c8a7977ed27dfeee26e294018cc
Contents?: true
Size: 443 Bytes
Versions: 2
Compression:
Stored size: 443 Bytes
Contents
module God module Behaviors class CleanPidFile < Behavior attr_accessor :pid_file def initialize self.pid_file = nil end def valid? valid = true valid &= complain("You must specify the 'pid_file' attribute for :clean_pid_file") if self.pid_file.nil? valid end def before_start File.delete(self.pid_file) rescue nil end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
god-0.2.0 | lib/god/behaviors/clean_pid_file.rb |
god-0.1.0 | lib/god/behaviors/clean_pid_file.rb |