summaryrefslogtreecommitdiff
path: root/lib/nickserver/dispatcher.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-08-30 12:10:57 +0200
committerAzul <azul@riseup.net>2016-08-30 12:36:40 +0200
commitb22e23eb9f5a1cb3e37ab2a26b1091183574f4e4 (patch)
treeb3ca7f91dd78994c5d0164645922b3929b9177a3 /lib/nickserver/dispatcher.rb
parent494e6f32daf0f6bf37321507b83848b4be087100 (diff)
refactor: make the RequestHandler classes callable
Whenever a RequestHandler class is called we instantiate it with the request. Then we call handle on the instance. This way we can access the request and its content via accessors rather than only in the handle method.
Diffstat (limited to 'lib/nickserver/dispatcher.rb')
-rw-r--r--lib/nickserver/dispatcher.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/nickserver/dispatcher.rb b/lib/nickserver/dispatcher.rb
index e461f12..9a031ab 100644
--- a/lib/nickserver/dispatcher.rb
+++ b/lib/nickserver/dispatcher.rb
@@ -47,10 +47,10 @@ module Nickserver
def handler_chain
[
- RequestHandlers::InvalidEmailHandler.new,
- RequestHandlers::LocalEmailHandler.new,
- RequestHandlers::HkpEmailHandler.new,
- RequestHandlers::FingerprintHandler.new,
+ RequestHandlers::InvalidEmailHandler,
+ RequestHandlers::LocalEmailHandler,
+ RequestHandlers::HkpEmailHandler,
+ RequestHandlers::FingerprintHandler,
Proc.new { Nickserver::Response.new(404, "Not Found\n") }
]
end