Make Route a Struct
This commit is contained in:
parent
ce024ba748
commit
0724e07c22
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
# Next
|
||||
|
||||
- Make `Route` a `Struct`.
|
||||
- Handlers are now completely customizable and you can specify your own handlers.
|
||||
|
||||
```ruby
|
||||
Kemal.config.handlers = [Kemal::InitHandler.new, YourHandler.new, Kemal::RouteHandler::INSTANCE]
|
||||
```
|
||||
|
||||
# 0.19.0 (09-05-2017)
|
||||
|
||||
- Return no body for head route fixes #323. (thanks @crisward)
|
||||
|
|
|
@ -2,7 +2,7 @@ module Kemal
|
|||
# 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 Route
|
||||
struct Route
|
||||
getter method, path, handler
|
||||
@handler : HTTP::Server::Context -> String
|
||||
@method : String
|
||||
|
|
Loading…
Reference in a new issue