class CTioga2::Commands::CommandArgument
An argument to a Command
@todo There should be real options mangling capacities, with:
-
(possibly deprecated) aliases for options
-
_ to - mangling
-
other things ?
Attributes
description[RW]
A small description of the argument
name[RW]
The name of the argument. Uniquely for display in the help documentation.
option_deprecated[RW]
Whether or not the option is deprecated.
If evaluates as true and different from true, is converted into a string used as an explanation to the user
option_target[RW]
The target for the option, in case it is different from its name
type[RW]
The type of the argument, a CommandType
object.
Public Class Methods
new(type, name = nil, desc = nil)
click to toggle source
type is a named CommandType
# File lib/ctioga2/commands/arguments.rb, line 50 def initialize(type, name = nil, desc = nil) @type = CommandType.get_type(type) @name = name @description = desc @option_target = nil @option_deprecated = false end
Public Instance Methods
displayed_name()
click to toggle source
Returns a name suitable for display in a documentation, such as the command-line help.
# File lib/ctioga2/commands/arguments.rb, line 61 def displayed_name if @name return @name else return @type.name end end