opts :: OptionFloat
opts :: OptionFloat :: defaultinit
Init a new OptionFloat with ahelp
message, a default
value and names
.
opts $ OptionFloat :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
opts :: Option :: default_value=
Default value of this optionopts :: OptionParameter :: defaultinit
opts :: OptionFloat :: defaultinit
Init a new OptionFloat with ahelp
message, a default
value 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 :: OptionParameter :: parameter_mandatory
Is the parameter mandatory?opts :: OptionParameter :: parameter_mandatory=
Is the parameter mandatory?opts :: Option :: read_param
Consume parameters for this option
# An option with a Float as parameter
class OptionFloat
super OptionParameter
redef type VALUE: Float
# Init a new OptionFloat with a `help` message, a `default` value and `names`.
init(help: String, default: Float, names: String...) is old_style_init do
super(help, default, names)
end
redef fun convert(str) do return str.to_f
end
lib/opts/opts.nit:248,1--259,3