class Optimist::Int32ArrayOpt

Overview

Option class for handling multiple Integers

Defined in:

optimist/option.cr

Constructors

Instance Method Summary

Instance methods inherited from class Optimist::Option

add_argument_value(a : Array(String), b : Bool) add_argument_value, default default, desc : String desc, description_with_default(str) description_with_default, description_with_permitted(str) description_with_permitted, disallow_multiple_args(paramlist : Array(String)) disallow_multiple_args, doesnt_need_autogen_short doesnt_need_autogen_short, educate educate, format_stdio(obj) format_stdio, full_description full_description, given? : Bool given?, long : Optimist::LongNames long, max_args : Int32 max_args, min_args : Int32 min_args, name : String name, needs_an_argument needs_an_argument, permitted : Array(Int32) | Array(String) | Range(Int32, Int32) | Regex | Nil permitted, permitted_response : String permitted_response, permitted_type_valid? permitted_type_valid?, permitted_value?(val : DefaultType) : Bool permitted_value?, required? : Bool required?, short : Optimist::ShortNames short, takes_an_argument takes_an_argument, takes_multiple takes_multiple, trigger_callback trigger_callback, type_format type_format, validate_permitted(arg : String, value : DefaultType) : Void validate_permitted, value value

Constructor methods inherited from class Optimist::Option

new(name : String, desc : String, default : T, long : LongNameType = nil, alt : AlternatesType = nil, short : ShortNameType = nil, permitted : PermittedType = nil, callback : Option -> Nil | Nil = nil, permitted_response : String = "option '%{arg}' only accepts %{valid_string}", required : Bool = false, hidden : Bool = false, multi : Bool | Nil = nil) forall T new

Class methods inherited from class Optimist::Option

create(name : String, desc : String, cls : Class | Nil = nil, default : _ = nil, **kwargs) create

Constructor Detail

def self.new(name, desc, default : Array(Int32) | Nil = nil, **kwargs) #

[View source]

Instance Method Detail

def add_argument_value(paramlist : Array(String), _neg_given) #

[View source]
def default : Array(Int32) #

[View source]
def dup #

For object duplication case we need to return an invalidated object so reset the value/given fields which are filled in by the option.


[View source]
def type_format #
Description copied from class Optimist::Option

Provide type-format string. Default to empty, but should probably be overridden for most subclasses.


[View source]
def value : Array(Int32) #

[View source]
def value=(value : Array(Int32)) #

[View source]