mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Added documentation for context, param_parser and route
This commit is contained in:
parent
a0c909621c
commit
5892d900ff
3 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue