]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/MultilineTernaryOperator in lib/redmine/wiki_formatt...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 11:22:41 +0000 (11:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 11:22:41 +0000 (11:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18706 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/wiki_formatting.rb

index eb7b00850cf4ffecb6b3101a833bf4ee5d95f654..cd832171cf6faffddd6baee964b10020d2b20382 100644 (file)
@@ -1131,7 +1131,6 @@ Style/MultilineTernaryOperator:
     - 'lib/redmine/scm/adapters/filesystem_adapter.rb'
     - 'lib/redmine/scm/adapters/git_adapter.rb'
     - 'lib/redmine/utils.rb'
-    - 'lib/redmine/wiki_formatting.rb'
 
 Style/MultipleComparison:
   Exclude:
index cae94d790246380984b7bd6e9184d4a9e0ae1a2a..1dc320c470ac43b79d27af0c4a93de91cbb34912 100644 (file)
@@ -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,