From: Toshi MARUYAMA Date: Sun, 13 Oct 2019 16:22:54 +0000 (+0000) Subject: code cleanup: rubocop: fix Layout/ClosingHeredocIndentation in app/models/setting.rb X-Git-Tag: 4.1.0~447 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b8f33b0694ba08395a4ff420d94087893a22a947;p=redmine.git code cleanup: rubocop: fix Layout/ClosingHeredocIndentation in app/models/setting.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18646 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 95b37d4b9..8ae3920c9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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' diff --git a/app/models/setting.rb b/app/models/setting.rb index ab1136077..5e94c37da 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -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