Class: RuboCop::ConfigObsoletion::Rule Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/config_obsoletion/rule.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.

Abstract base class for ConfigObsoletion rules

API:

  • private

Direct Known Subclasses

CopRule, ParameterRule

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Rule

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 Rule.

API:

  • private



8
9
10
# File 'lib/rubocop/config_obsoletion/rule.rb', line 8

def initialize(config)
  @config = config
end

Instance Method Details

#cop_rule?Boolean

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.

Does this rule relate to cops?

Returns:

API:

  • private



13
14
15
# File 'lib/rubocop/config_obsoletion/rule.rb', line 13

def cop_rule?
  false
end

#parameter_rule?Boolean

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.

Does this rule relate to parameters?

Returns:

API:

  • private



18
19
20
# File 'lib/rubocop/config_obsoletion/rule.rb', line 18

def parameter_rule?
  false
end

#violated?Boolean

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:

Raises:

API:

  • private



22
23
24
# File 'lib/rubocop/config_obsoletion/rule.rb', line 22

def violated?
  raise NotImplementedError
end