]> source.dussan.org Git - redmine.git/commitdiff
shorten long line of lib/redmine/hook.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 19 Nov 2020 13:30:00 +0000 (13:30 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 19 Nov 2020 13:30:00 +0000 (13:30 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20429 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/hook.rb

index 46b9d4ea5dfa252cb72479849d00ac9634111cfd..4b87f97c1a3dc223c7b3974ed1724095c89b919a 100644 (file)
@@ -27,7 +27,10 @@ module Redmine
       # Adds a listener class.
       # Automatically called when a class inherits from Redmine::Hook::Listener.
       def add_listener(klass)
-        raise "Hooks must include Singleton module." unless klass.included_modules.include?(Singleton)
+        unless klass.included_modules.include?(Singleton)
+          raise "Hooks must include Singleton module."
+        end
+
         @@listener_classes << klass
         clear_listeners_instances
       end