class RemiLib::Args::MultiIntArgument

Overview

Similar to an IntArgument, 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 <<(val : Int64) #

Appends val to this argument's values. val will be validated against #constraint first. This sets #called to true, and increases #times by one.


[View source]
def <<(newValue) #

Appends newVal to this argument's values. newVal will be validated against #constraint first. This sets #called to true, and increases #times by one.

newValue must respond to #to_i64.


[View source]
def maximum : Int64 #

The maximum for all accepted values for this argument.


[View source]
def maximum=(maximum : Int64) #

The maximum for all accepted values for this argument.


[View source]
def minimum : Int64 #

The minimum for all accepted values for this argument.


[View source]
def minimum=(minimum : Int64) #

The minimum for all accepted values for this argument.


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

Sets all of the values for this argument in one go. All arguments will be checked against the minimum and maximum. This does not set #called? to true, but does set #times. It does not check #minimum and #maximum.


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

Sets all of the values for this argument in one go. All arguments will be checked against the minimum and maximum. This does not set #called? to true, but does set #times. It does not check #minimum and #maximum.


[View source]
def str : String #

Returns all values stored in this argument as a string.


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

Returns the values stored in this argument.


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

Sets all of the values for this argument in one go. All arguments will be checked against the minimum and maximum. This sets #called? to true, and sets #times.


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

Sets all of the values for this argument in one go. All arguments will be checked against the minimum and maximum. This sets #called? to true, and sets #times.


[View source]