Early return from range if request type is not GET

This commit is contained in:
Sdogruyol 2017-02-04 13:35:46 +03:00
parent 0543142a10
commit 476b27892e
5 changed files with 37 additions and 40 deletions

View file

@ -4,7 +4,6 @@ require "./kemal/*"
require "./kemal/helpers/*"
module Kemal
# Overload of self.run with the default startup logging
def self.run(port = nil)
self.run port do
@ -14,9 +13,8 @@ module Kemal
# Overload of self.run to allow just a block
def self.run(&block)
self.run nil &block
self.run nil & block
end
# The command to run a `Kemal` application.
# The port can be given to `#run` but is optional.