diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 11:22:41 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 11:22:41 +0000 |
commit | 397fa6a001514af8650a383c23556243723b83da (patch) | |
tree | 7d66f6b7a3b14bb42411fccb410e808690615189 /lib/redmine/wiki_formatting.rb | |
parent | 04cf448648458bbbe9cfd7b4559522d3a3bb1595 (diff) | |
download | redmine-397fa6a001514af8650a383c23556243723b83da.tar.gz redmine-397fa6a001514af8650a383c23556243723b83da.zip |
code cleanup: rubocop: fix Style/MultilineTernaryOperator in lib/redmine/wiki_formatting.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18706 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting.rb')
-rw-r--r-- | lib/redmine/wiki_formatting.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index cae94d790..1dc320c47 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -34,13 +34,13 @@ module Redmine options = args.last.is_a?(Hash) ? args.pop : {} name = name.to_s raise ArgumentError, "format name '#{name}' is already taken" if @@formatters[name] - - formatter, helper, parser = args.any? ? - args : - %w(Formatter Helper HtmlParser).map {|m| "Redmine::WikiFormatting::#{name.classify}::#{m}".constantize rescue nil} - + formatter, helper, parser = + if args.any? + args + else + %w(Formatter Helper HtmlParser).map {|m| "Redmine::WikiFormatting::#{name.classify}::#{m}".constantize rescue nil} + end raise "A formatter class is required" if formatter.nil? - @@formatters[name] = { :formatter => formatter, :helper => helper, |