From: Andrew Otto Date: Thu, 19 Apr 2012 18:15:08 +0000 (-0400) Subject: server/controller.co - documentation for mapping property X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=0ffa11b0e5b237aeccbc2c3dad549600ac8e4c77;p=limn-bak.git server/controller.co - documentation for mapping property --- diff --git a/lib/server/controller.co b/lib/server/controller.co index 9187709..6ae94fa 100644 --- a/lib/server/controller.co +++ b/lib/server/controller.co @@ -42,6 +42,16 @@ class Controller extends Resource * for this sub-route. * - Object: Hash of HTTP-method (get, put, post, del, or all) to the name * of a method on this Controller. + * + * Example: + * { '/foo' => 'foo', + * '/bar' => {'get' => 'get_bar', 'del' => 'delete_bar' }, + * } + * If this mapping is in a controller with name 'nonya', then + * GET '/nonya/foo' -> NonyaController.foo(), + * GET '/nonya/bar' -> NonyaController.get_bar() + * DELETE '/nonya/bar' -> NonyaController.delete_bar() + * * @type Object */ mapping : null