opts :: OptionCount
opts :: OptionCount :: defaultinit
Init a new OptionCount with ahelp
message and names
.
opts $ OptionCount :: SELF
Type of this instance, automatically specialized in every classopts $ OptionCount :: 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 :: OptionCount :: defaultinit
Init a new OptionCount 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 count option. Count the number of time this option is present
class OptionCount
super Option
redef type VALUE: Int is fixed
# Init a new OptionCount with a `help` message and `names`.
init(help: String, names: String...) is old_style_init do super(help, 0, names)
redef fun read_param(opts, it)
do
super
value += 1
end
end
lib/opts/opts.nit:127,1--140,3