Class: RuboCop::ConfigObsoletion::SplitCop Private
- Defined in:
- lib/rubocop/config_obsoletion/split_cop.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Encapsulation of a ConfigObsoletion rule for splitting a cop’s functionality into multiple new cops.
Instance Attribute Summary collapse
- #metadata ⇒ Object readonly private
Attributes inherited from CopRule
Instance Method Summary collapse
-
#initialize(config, old_name, metadata) ⇒ SplitCop
constructor
private
A new instance of SplitCop.
- #rule_message ⇒ Object private
Methods inherited from CopRule
#cop_rule?, #message, #violated?, #warning?
Methods inherited from Rule
#cop_rule?, #parameter_rule?, #violated?
Constructor Details
#initialize(config, old_name, metadata) ⇒ SplitCop
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SplitCop.
11 12 13 14 |
# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 11 def initialize(config, old_name, ) super(config, old_name) @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 9 def @metadata end |
Instance Method Details
#rule_message ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rubocop/config_obsoletion/split_cop.rb', line 16 def "The `#{old_name}` cop has been split into #{to_sentence(alternatives)}." end |