123456789_123456789_123456789_123456789_123456789_

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:
self, CopRule, Rule
Instance Chain:
self, CopRule, Rule
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

CopRule - Inherited

Rule - Inherited

Instance Attribute Summary

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

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 rule_message
  "The `#{old_name}` cop has been split into #{to_sentence(alternatives)}."
end