Module: RuboCop::Cop::ConfigurableMax Deprecated
| Relationships & Source Files | |
| Defined in: | lib/rubocop/cop/mixin/configurable_max.rb |
Overview
Deprecated.
Use exclude_limit <ParameterName> instead.
Handles Max configuration parameters, especially setting them to an
appropriate value with --auto-gen-config.
Instance Attribute Summary
- #max=(value) writeonly private
Instance Method Summary
- #max_parameter_name private
Instance Attribute Details
#max=(value) (writeonly, private)
[ GitHub ]# File 'lib/rubocop/cop/mixin/configurable_max.rb', line 11
def max=(value) warn Rainbow(<<~WARNING).yellow, uplevel: 1 `max=` is deprecated. Use `exclude_limit <ParameterName>` instead. WARNING cop_dir = RuboCop::ExcludeLimit.cop_dir_for(self.class.badge.to_s) return unless cop_dir cop_dir.mkpath filepath = cop_dir.join(max_parameter_name) filepath.write("#{value}\n", mode: 'a') end
Instance Method Details
#max_parameter_name (private)
[ GitHub ]# File 'lib/rubocop/cop/mixin/configurable_max.rb', line 24
def max_parameter_name 'Max' end