lib: add value_name to OptionEnum to get the selected name
authorJean-Sebastien Gelinas <calestar@gmail.com>
Thu, 3 Sep 2009 20:44:33 +0000 (16:44 -0400)
committerJean Privat <jean@pryen.org>
Fri, 11 Sep 2009 17:54:16 +0000 (13:54 -0400)
Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

lib/opts.nit

index 1673215..2850507 100644 (file)
@@ -151,6 +151,8 @@ special OptionParameter
                return id
        end
 
+       fun value_name: String = _enum[value]
+
        redef fun pretty_default
        do
                if default_value != null then