lib/ctioga2/commands/commands.rb in ctioga2-0.0 vs lib/ctioga2/commands/commands.rb in ctioga2-0.1
- old
+ new
@@ -15,11 +15,11 @@
require 'ctioga2/commands/arguments'
require 'ctioga2/commands/groups'
module CTioga2
- Version::register_svn_info('$Revision: 16 $', '$Date: 2009-04-28 00:50:08 +0200 (Tue, 28 Apr 2009) $')
+ Version::register_svn_info('$Revision: 144 $', '$Date: 2010-04-06 13:31:39 +0200 (Tue, 06 Apr 2010) $')
module Commands
# An exception raised when the command is called with an insufficient
# number of arguments.
@@ -30,10 +30,17 @@
# that does not match an entry in Command#optional_arguments
class CommandOptionUnkown < Exception
end
# One of the commands that can be used.
+ #
+ # \todo Write a Shortcut command that would simply be a shortcut
+ # for other things. Possibly taking arguments ? It could take a
+ # description, though that wouldn't be necessary.
+ #
+ # \todo Use this Shortcut to write DeprecatedShortcut for old
+ # ctioga options.
class Command
# The name of the command, ie how to call it in a commands file
attr_accessor :name
@@ -217,10 +224,14 @@
return target_options
end
# Whether the Command accepts the named _option_.
#
- # TODO: maybe convert everything to lowercase ?????
+ # \todo Several conversions could be used, to facilitate the
+ # writing of options:
+ #
+ # * convert everything to lowercase .
+ # * ignore the difference between _ and - (a bit delicate).
def has_option?(option)
return @optional_arguments.key? option
end
# Whether the Command accepts any option at all ?