- init(help: String, default: Int, names: String...) do init_opt(help, default, names)
-
- redef meth convert(str) do return str.to_i
+ # Init a new OptionInt with a `help` message, a `default` value and `names`.
+ init(help: String, default: Int, names: String...) is old_style_init do
+ super(help, default, names)
+ end
+
+ redef fun convert(str) do return str.to_i
+end
+
+# 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