Command::Base
Inherits Reference < Object
Base class for creating command-line interfaces.
Constructors
Class methods
description(text : String)
Sourcefor(args, root)
Sourceget_command(cmd_array)
Sourceoption(long : String, short : String, description : String = "", default : String | Nil = nil, required : Bool = false, type : Symbol = :bool)
Defines a command-line option.
positional(name : String, description : String = "", type : Symbol = :string, required : Bool = true)
Defines a positional argument.
self_description
Sourceself_description=(self_description : String | Nil)
Sourceself_options
Sourceself_options=(self_options : Hash(String, NamedTuple(short: String, description: String, default: Nil | String, required: Bool, type: Symbol)))
Sourceself_positionals
Sourceself_positionals=(self_positionals : Array(NamedTuple(name: String, description: String, type: Symbol, required: Bool)))
Sourceself_sub_commands
SourceInstance methods
error!(message)
Sourceprint_help
Sourcesub_command_instance
Source