Class: RuboCop::Cop::MagicNumbers::Base
- Inherits:
-
Object
- Object
- RuboCop::Cop::MagicNumbers::Base
- Defined in:
- lib/rubocop/cop/magic_numbers/base.rb
Overview
Base class for all shared behaviour between these cops
Direct Known Subclasses
Constant Summary collapse
- CONFIG_ALL =
'All'
- CONFIG_FLOAT =
'Float'
- CONFIG_INTEGER =
'Integer'
- CONFIG_NAME_FORBIDDEN_NUMERICS =
'ForbiddenNumerics'
- DEFAULT_CONFIG =
{ CONFIG_NAME_FORBIDDEN_NUMERICS => CONFIG_ALL }.freeze
- ILLEGAL_SCALAR_TYPES =
{ CONFIG_ALL => %i[float int], CONFIG_INTEGER => %i[int], CONFIG_FLOAT => %i[float] }.freeze
Instance Method Summary collapse
-
#cop_config ⇒ Object
The configuration for this cop, pre-set with defaults.
Instance Method Details
#cop_config ⇒ Object
The configuration for this cop, pre-set with defaults
Returns Hash
44 45 46 |
# File 'lib/rubocop/cop/magic_numbers/base.rb', line 44 def cop_config DEFAULT_CONFIG.merge(super) end |