summaryrefslogtreecommitdiff
path: root/lib/nickserver/handler_chain.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2017-09-23 11:07:32 +0200
committerAzul <azul@riseup.net>2017-09-23 16:53:27 +0200
commit40916407517f4bdb75a295caf29e02d4f403349b (patch)
tree8219567c0ecdf583fdd916594ec7915ab9eb2f19 /lib/nickserver/handler_chain.rb
parent22c6c80310a8d3d3abbd1006598b4fbaec98ffd0 (diff)
style: rubocop mostly auto-correct
Diffstat (limited to 'lib/nickserver/handler_chain.rb')
-rw-r--r--lib/nickserver/handler_chain.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nickserver/handler_chain.rb b/lib/nickserver/handler_chain.rb
index afc24a5..843313e 100644
--- a/lib/nickserver/handler_chain.rb
+++ b/lib/nickserver/handler_chain.rb
@@ -14,7 +14,6 @@
module Nickserver
class HandlerChain
-
def initialize(*handlers)
@handlers = handlers
@exceptions_to_rescue = []
@@ -27,7 +26,7 @@ module Nickserver
def handle(*args)
result = nil
- _handled_by = @handlers.find{|h| result = try_handler(h, *args)}
+ _handled_by = @handlers.find { |h| result = try_handler(h, *args) }
result
end
@@ -41,7 +40,7 @@ module Nickserver
def try_handler(handler, *args)
result = handler.call(*args)
rescue *exceptions_to_rescue
- self.rescued_exceptions << $!
+ rescued_exceptions << $ERROR_INFO
result = false
end
end