Add missing class keyword to docs (#264)
This commit is contained in:
parent
92ea55773b
commit
13293a675d
2 changed files with 5 additions and 5 deletions
|
@ -28,7 +28,7 @@ For example this handler will only work on `/` path. By default the HTTP method
|
|||
|
||||
|
||||
```crystal
|
||||
OnlyHandler < Kemal::Handler
|
||||
class OnlyHandler < Kemal::Handler
|
||||
only ["/"]
|
||||
|
||||
def call(env)
|
||||
|
@ -41,7 +41,7 @@ end
|
|||
The handlers using `exclude` will work on the paths that isn't specified. For example this handler will work on any routes other than `/`.
|
||||
|
||||
```crystal
|
||||
ExcludeHandler < Kemal::Handler
|
||||
class ExcludeHandler < Kemal::Handler
|
||||
exclude ["/"]
|
||||
|
||||
def call(env)
|
||||
|
@ -92,7 +92,7 @@ post "/upload" do |env|
|
|||
"Upload complete"
|
||||
end
|
||||
end
|
||||
```
|
||||
```
|
||||
|
||||
- Make session configurable. Now you can specify session name and expire time wit
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class Kemal::Handler < HTTP::Handler
|
|||
#
|
||||
# However this is not done automatically. All handlers must inherit from `Kemal::Handler`.
|
||||
#
|
||||
# OnlyHandler < Kemal::Handler
|
||||
# class OnlyHandler < Kemal::Handler
|
||||
# only ["/"]
|
||||
#
|
||||
# def call(env)
|
||||
|
@ -46,7 +46,7 @@ class Kemal::Handler < HTTP::Handler
|
|||
#
|
||||
# However this is not done automatically. All handlers must inherit from `Kemal::Handler`.
|
||||
#
|
||||
# ExcludeHandler < Kemal::Handler
|
||||
# class ExcludeHandler < Kemal::Handler
|
||||
# exclude ["/"]
|
||||
#
|
||||
# def call(env)
|
||||
|
|
Loading…
Reference in a new issue