lib/daemon-ogre/argv.rb in daemon-ogre-2.1.1 vs lib/daemon-ogre/argv.rb in daemon-ogre-2.1.2

- old
+ new

@@ -3,11 +3,11 @@ module DARGV class << self def check_args_for( *args ) args = args.map(&:to_s) - return ARGV.options.any?{|opt| args.include?(opt) } + return ::ARGV.any?{|argument| args.any?{|string_to_find| argument =~ Regexp.new(string_to_find.to_s) }} end @@daemon_keys= [:daemonize,:daemon,:d] def daemonize? check_args_for( *@@daemon_keys ) @@ -16,26 +16,9 @@ @@terminate_keys= [:terminate,:kill,:k] def terminate? check_args_for( *@@terminate_keys ) end - - ARGV.add_help( - [ - 'Start with one of the following tags the app,', - 'and it will be daemonized' - ].join(' '), - *@@daemon_keys.map(&:to_s) - - ) - - ARGV.add_help( - [ - 'Start with one of the following tags the app,', - 'and it will be terminate the running app instance' - ].join(' '), - *@@terminate_keys.map(&:to_s) - ) end end end