opts :: OptionBool
true when present, false if notopts :: OptionBool :: defaultinit
Init a new OptionBool with ahelp message and names.
opts $ OptionBool :: SELF
Type of this instance, automatically specialized in every classopts $ OptionBool :: read_param
Consume parameters for this optioncore :: Object :: class_factory
Implementation used byget_class to create the specific class.
opts :: Option :: default_value=
Default value of this optionopts :: OptionBool :: defaultinit
Init a new OptionBool with ahelp message and names.
core :: Object :: defaultinit
opts :: Option :: defaultinit
Create a new optioncore :: Object :: is_same_instance
Return true ifself and other are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself the same as other in a serialization context?
core :: Object :: is_same_type
Return true ifself and other have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).opts :: Option :: read_param
Consume parameters for this option
# A boolean option, `true` when present, `false` if not
class OptionBool
super Option
redef type VALUE: Bool
# Init a new OptionBool with a `help` message and `names`.
init(help: String, names: String...) is old_style_init do super(help, false, names)
redef fun read_param(opts, it)
do
super
value = true
end
end
lib/opts/opts.nit:112,1--125,3