class RemiLib::Args::MultiStringArgument

Overview

Similar to a StringArgument, except that it can be called multiple times.

Included Modules

Defined in:

remilib/args/arg-types.cr

Instance Method Summary

Instance methods inherited from module RemiLib::Args::MultiValArgument

<<(newValue) <<, setValues!(vals) : Nil setValues!, times : Int32 times, times=(times : Int32) times=, values values, values=(vals) : Nil values=

Instance methods inherited from class RemiLib::Args::Argument

callback : ArgCallbackFunc | Nil callback, callback=(callback : ArgCallbackFunc | Nil) callback=, called? : Bool called?, group : String group, group=(group : String) group=, help : String help, help=(help : String) help=, longName : String longName, longName=(newName : String) : Nil longName=, shortName : Char | Nil shortName, shortName=(shortName : Char | Nil) shortName=

Constructor methods inherited from class RemiLib::Args::Argument

new(newLongName, shortName : Char | Nil = nil, group : String = "", help : String = "") new

Instance Method Detail

def <<(newVal : String) #

Appends a new value to the argument. This also sets #called to true, and increases #times by one.


[View source]
def <<(newValue) #

Appends a new value to the argument. This also sets #called to true, and increases #times by one.


[View source]
def oneOf : Array(String) #

A list of values that the argument is allowed to take. If the user provides a value that does not match any of these, an ArgumentError is raised during parsing.


[View source]
def oneOf=(oneOf : Array(String)) #

A list of values that the argument is allowed to take. If the user provides a value that does not match any of these, an ArgumentError is raised during parsing.


[View source]
def setValues!(newVal : Array(String)) : Nil #

Sets the value of this argument. This does not set #called to true, but does set #times to the length of newVal. This does not check the value against #oneOf.


[View source]
def setValues!(vals) : Nil #

Sets the value of this argument. This does not set #called to true, but does set #times to the length of newVal. This does not check the value against #oneOf.


[View source]
def str : String #

Returns all values stored in this argument as a string.


[View source]
def values : Array(String) #

Returns all values stored in this argument.


[View source]
def values=(vals : Array(String)) : Nil #

Sets the value of this argument. This also sets #called to true and sets #times to the length of newVal.


[View source]
def values=(vals) : Nil #

Sets the value of this argument. This also sets #called to true and sets #times to the length of newVal.


[View source]