lib/nitcorn: redef to_s service on UriPart subclasses
authorAlexandre Terrasa <alexandre@moz-code.org>
Mon, 16 May 2016 15:38:48 +0000 (11:38 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 19 May 2016 21:33:52 +0000 (17:33 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/nitcorn/vararg_routes.nit

index 07664f6..3ec5dc1 100644 (file)
@@ -226,6 +226,8 @@ private class UriParam
 
        # Parameters match everything.
        redef fun match(part) do return true
+
+       redef fun to_s do return name
 end
 
 # A static uri string like `users`.
@@ -237,6 +239,8 @@ private class UriString
 
        # Empty strings match everything otherwise matching is based on string equality.
        redef fun match(part) do return string.is_empty or string == part
+
+       redef fun to_s do return string
 end
 
 redef class Routes