Class: RuboCop::ConfigObsoletion::ChangedEnforcedStyles Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
ParameterRule ,
Rule
|
|
Instance Chain:
self,
ParameterRule ,
Rule
|
|
Inherits: |
RuboCop::ConfigObsoletion::ParameterRule
|
Defined in: | lib/rubocop/config_obsoletion/changed_enforced_styles.rb |
Overview
Encapsulation of a ConfigObsoletion rule for changing a parameter
Constant Summary
-
BASE_MESSAGE =
# File 'lib/rubocop/config_obsoletion/changed_enforced_styles.rb', line 8'obsolete `%<parameter>s: %<value>s` (for `%<cop>s`) found in %<path>s'
Class Method Summary
Instance Attribute Summary
- #violated? ⇒ Boolean readonly Internal use only
ParameterRule
- Inherited
#cop, #metadata, #parameter, #parameter_rule?, #violated?, #warning?, #applies_to_current_ruby_version? |
Rule
- Inherited
#cop_rule? | Does this rule relate to cops? |
#parameter_rule? | Does this rule relate to parameters? |
#violated?, #config |
Instance Method Summary
ParameterRule
- Inherited
Rule
- Inherited
Instance Attribute Details
#violated? ⇒ Boolean
(readonly)
Instance Method Details
#message
[ GitHub ]# File 'lib/rubocop/config_obsoletion/changed_enforced_styles.rb', line 14
def 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
#value (private)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/changed_enforced_styles.rb', line 28
def value ['value'] end