Sha256: 3bc85910bacf8ef9a681b6bf43402a8b386dc6635ee89997f847578e2074ba46
Contents?: true
Size: 532 Bytes
Versions: 2
Compression:
Stored size: 532 Bytes
Contents
module DaemonOgre module DARGV class << self def check_args_for( *args ) args = args.map(&:to_s) return ::ARGV.any?{|argument| args.any?{|string_to_find| argument =~ /--?#{string_to_find.to_s}$/ }} end @@daemon_keys= [:daemonize,:daemon,:d] def daemonize? check_args_for( *@@daemon_keys ) end alias :daemon? :daemonize? @@terminate_keys= [:terminate,:kill,:k] def terminate? check_args_for( *@@terminate_keys ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
daemon-ogre-2.2.0 | lib/daemon-ogre/argv.rb |
daemon-ogre-2.1.3 | lib/daemon-ogre/argv.rb |