1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-11 13:15:20 +00:00

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
This commit is contained in:
Toshi MARUYAMA 2019-10-13 16:22:54 +00:00
parent f3f1fad8de
commit b8f33b0694
2 changed files with 11 additions and 12 deletions

View 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'

View 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