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