Hong Minhee committed 2e39206

Renamed `vlastic.rom.decorator.method` to `MethodDecorator` with keeping former name.

Comments (0)

Files changed (1)


 from .. import http
 from . import resource
-__all__ = ["NegotiativeView", "method", "get", "post", "put", "delete"]
+__all__ = ["NegotiativeView", "MethodDecorator", "method", "get", "post",
+           "put", "delete"]
 class NegotiativeView(dict):
     """Accept-aware higher-order view functor. Its constructor takes a
-    {'mime/type': view} map for negotiation.
+    {'mime/type': view...} map for negotiation.
             return view(context)
-class method:
+class MethodDecorator:
     """Creates a decorator to make a function to handle specific HTTP method
     e.g. GET, POST.
         return decorator
-get = method("GET")
-post = method("POST")
-put = method("PUT")
-delete = method("DELETE")
+method = MethodDecorator
+get = MethodDecorator("GET")
+post = MethodDecorator("POST")
+put = MethodDecorator("PUT")
+delete = MethodDecorator("DELETE")