1
# arguments.rb: arguments to commands
2
# copyright (c) 2009 by Vincent Fourmond
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details (in the COPYING file).
14
require 'ctioga2/utils'
15
require 'ctioga2/commands/type'
19
Version::register_svn_info('$Revision: 18 $', '$Date: 2009-04-28 23:43:54 +0200 (Tue, 28 Apr 2009) $')
23
# An argument to a Command
26
# The type of the argument, a CTioga2::MetaBuilder::Type object.
29
# The name of the argument. Uniquely for display in the help
33
# A small description of the argument
34
attr_accessor :description
36
# _type_ is a named CommandType
37
def initialize(type, name = nil, desc = nil)
38
@type = CommandType.get_type(type)
43
# Returns a name suitable for display in a documentation, such
44
# as the command-line help.