Class: RuboCop::ConfigObsoletion::SplitCop 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/split_cop.rb |
Overview
Encapsulation of a ConfigObsoletion rule for splitting a cop’s functionality into multiple new cops.
Class Method Summary
- .new(config, old_name, metadata) ⇒ SplitCop constructor Internal use only
CopRule
- Inherited
Rule
- Inherited
Instance Attribute Summary
- #metadata readonly 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
- #alternatives private Internal use only
CopRule
- Inherited
Rule
- Inherited
Instance Attribute Details
#metadata (readonly)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 9
attr_reader :
Instance Method Details
#alternatives (private)
[ GitHub ]# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 22
def alternatives Array( ['alternatives']).map { |name| "`#{name}`" } end
#rule_message
[ GitHub ]# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 16
def "The `#{old_name}` cop has been split into #{to_sentence(alternatives)}." end