diff options
Diffstat (limited to 'cask/test/src/test/cask/Decorated.scala')
-rw-r--r-- | cask/test/src/test/cask/Decorated.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cask/test/src/test/cask/Decorated.scala b/cask/test/src/test/cask/Decorated.scala new file mode 100644 index 0000000..94a1ce2 --- /dev/null +++ b/cask/test/src/test/cask/Decorated.scala @@ -0,0 +1,17 @@ +package test.cask +import cask.model.ParamContext + + +object Decorated extends cask.MainRoutes{ + class myDecorator extends cask.Routes.Decorator { + def getParamValues(ctx: ParamContext) = Map("extra" -> 31337) + } + + @myDecorator() + @cask.get("/hello/:world") + def hello(world: String)(extra: Int) = { + world + extra + } + + initialize() +} |