class RemiLib::Args::MultiStringArgument
- RemiLib::Args::MultiStringArgument
- RemiLib::Args::Argument
- Reference
- Object
Overview
Similar to a StringArgument
, except that it can be called multiple times.
Included Modules
Defined in:
remilib/args/arg-types.crInstance Method Summary
-
#<<(newVal : String)
Appends a new value to the argument.
-
#<<(newValue)
Appends a new value to the argument.
-
#oneOf : Array(String)
A list of values that the argument is allowed to take.
-
#oneOf=(oneOf : Array(String))
A list of values that the argument is allowed to take.
-
#setValues!(newVal : Array(String)) : Nil
Sets the value of this argument.
-
#setValues!(vals) : Nil
Sets the value of this argument.
-
#str : String
Returns all values stored in this argument as a string.
-
#values : Array(String)
Returns all values stored in this argument.
-
#values=(vals : Array(String)) : Nil
Sets the value of this argument.
-
#values=(vals) : Nil
Sets the value of this argument.
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
Appends a new value to the argument. This also sets #called
to true
,
and increases #times
by one.
Appends a new value to the argument. This also sets #called
to true
,
and increases #times
by one.
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.
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.
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
.
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
.
Sets the value of this argument. This also sets #called
to true
and
sets #times
to the length of newVal
.
Sets the value of this argument. This also sets #called
to true
and
sets #times
to the length of newVal
.