]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Layout/ClosingHeredocIndentation in app/models/setting.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 13 Oct 2019 16:22:54 +0000 (16:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 13 Oct 2019 16:22:54 +0000 (16:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18646 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/setting.rb

index 95b37d4b92f4bae32e8e2ac481120d96649ac424..8ae3920c9c77b72ab356c99032009c16ef93f985 100644 (file)
@@ -85,7 +85,6 @@ Layout/CaseIndentation:
 # Cop supports --auto-correct.
 Layout/ClosingHeredocIndentation:
   Exclude:
-    - 'app/models/setting.rb'
     - 'test/helpers/application_helper_test.rb'
     - 'test/integration/lib/redmine/hook_test.rb'
     - 'test/unit/lib/redmine/unified_diff_test.rb'
index ab11360772af5da04a6b8e396ae395282527882f..5e94c37dab94ca14127a1a61c655619334dbe56f 100644 (file)
@@ -271,19 +271,19 @@ class Setting < ActiveRecord::Base
   def self.define_setting(name, options={})
     available_settings[name.to_s] = options
 
-    src = <<-END_SRC
-    def self.#{name}
-      self[:#{name}]
-    end
+    src = <<~END_SRC
+      def self.#{name}
+        self[:#{name}]
+      end
 
-    def self.#{name}?
-      self[:#{name}].to_i > 0
-    end
+      def self.#{name}?
+        self[:#{name}].to_i > 0
+      end
 
-    def self.#{name}=(value)
-      self[:#{name}] = value
-    end
-END_SRC
+      def self.#{name}=(value)
+        self[:#{name}] = value
+      end
+    END_SRC
     class_eval src, __FILE__, __LINE__
   end