diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-19 13:30:00 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-19 13:30:00 +0000 |
commit | f49ab715f71db434c3b98517bd6b7703a99a1435 (patch) | |
tree | 2a1ee0f78a0dce95b7fb8497ca991a80f771bf3c /lib | |
parent | c85a18e9bf296cef14e36cf52599b6749f022dd8 (diff) | |
download | redmine-f49ab715f71db434c3b98517bd6b7703a99a1435.tar.gz redmine-f49ab715f71db434c3b98517bd6b7703a99a1435.zip |
shorten long line of lib/redmine/hook.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20429 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/hook.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/redmine/hook.rb b/lib/redmine/hook.rb index 46b9d4ea5..4b87f97c1 100644 --- a/lib/redmine/hook.rb +++ b/lib/redmine/hook.rb @@ -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 |