Added documentation for context, param_parser and route

This commit is contained in:
Sdogruyol 2015-10-29 17:16:29 +02:00
parent a0c909621c
commit 5892d900ff
3 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# Context is the environment which holds request/response specific
# information such as params, content_type e.g
class Kemal::Context
getter request
getter params

View File

@ -1,3 +1,6 @@
# ParamParser parses the request contents including query_params and body
# and converts them into a params hash which you can within the environment
# context.
class Kemal::ParamParser
def initialize(@route, @request)
@route_components = route.components

View File

@ -1,3 +1,6 @@
# Route is the main building block of Kemal.
# It takes 3 parameters method, path and a block to specify
# what action to be done if the route is matched.
class Kemal::Route
getter handler
getter components