class RuboCop::ConfigObsoletion::ChangedEnforcedStyles
Encapsulation of a ConfigObsoletion
rule for changing a parameter @api private
Constants
- BASE_MESSAGE
Public Instance Methods
message()
click to toggle source
# File lib/rubocop/config_obsoletion/changed_enforced_styles.rb, line 14 def message base = format(BASE_MESSAGE, parameter: parameter, value: value, cop: cop, path: smart_loaded_path) if alternative "#{base}\n`#{parameter}: #{value}` has been renamed to " \ "`#{parameter}: #{alternative.chomp}`." else "#{base}\n#{reason.chomp}" end end
violated?()
click to toggle source
Calls superclass method
# File lib/rubocop/config_obsoletion/changed_enforced_styles.rb, line 10 def violated? super && config[cop][parameter] == value end
Private Instance Methods
value()
click to toggle source
# File lib/rubocop/config_obsoletion/changed_enforced_styles.rb, line 28 def value metadata['value'] end