Class: RuboCop::ConfigObsoletion::RenamedCop Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
RuboCop::ConfigObsoletion::CopRule
|
Defined in: | lib/rubocop/config_obsoletion/renamed_cop.rb |
Overview
Encapsulation of a ConfigObsoletion rule for renaming a cop or moving it to a new department.
Class Method Summary
- .new(config, old_name, name_or_hash) ⇒ RenamedCop constructor Internal use only
CopRule
- Inherited
Rule
- Inherited
Instance Attribute Summary
- #metadata readonly Internal use only
- #new_name readonly Internal use only
- #warning? ⇒ Boolean readonly Internal use only
- #moved? ⇒ Boolean readonly private Internal use only
CopRule
- Inherited
#cop_rule?, #old_name, #violated?, | |
#warning? | Cop rules currently can only be failures, not warnings. |
Rule
- Inherited
#cop_rule? | Does this rule relate to cops? |
#parameter_rule? | Does this rule relate to parameters? |
#violated?, #config |
Instance Method Summary
- #rule_message Internal use only
- #severity private Internal use only
- #verb private Internal use only
CopRule
- Inherited
Rule
- Inherited
Instance Attribute Details
#metadata (readonly)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/renamed_cop.rb', line 9
attr_reader :new_name, :
#moved? ⇒ Boolean
(readonly, private)
#new_name (readonly)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/renamed_cop.rb', line 9
attr_reader :new_name, :
#warning? ⇒ Boolean
(readonly)
# File 'lib/rubocop/config_obsoletion/renamed_cop.rb', line 27
def warning? severity == 'warning' end
Instance Method Details
#rule_message
[ GitHub ]#severity (private)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/renamed_cop.rb', line 44
def severity ['severity'] end
#verb (private)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/renamed_cop.rb', line 40
def verb moved? ? 'moved' : 'renamed' end