class Opal::CLI::Argument

Overview

Represents a positional argument for a command.

Defined in:

opal/cli/argument.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : Symbol, description : String = "", required : Bool = false, default : String | Nil = nil, type : Symbol = :string, multiple : Bool = false, choices : Array(String) | Nil = nil, value_name : String | Nil = nil) #

[View source]

Instance Method Detail

def choices : Array(String) | Nil #

[View source]
def default : String | Nil #

[View source]
def description : String #

[View source]
def formatted_name : String #

Formatted argument display name (e.g. "<files...>" or "[files...]")


[View source]
def multiple? : Bool #

[View source]
def name : Symbol #

[View source]
def required? : Bool #

[View source]
def type : Symbol #

[View source]
def value_name : String | Nil #

[View source]