nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d9494f
)
lib/nitcorn: redef to_s service on UriPart subclasses
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 16 May 2016 15:38:48 +0000
(11:38 -0400)
committer
Alexandre 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
patch
|
blob
|
history
diff --git
a/lib/nitcorn/vararg_routes.nit
b/lib/nitcorn/vararg_routes.nit
index
07664f6
..
3ec5dc1
100644
(file)
--- a/
lib/nitcorn/vararg_routes.nit
+++ b/
lib/nitcorn/vararg_routes.nit
@@
-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