Represents a single set of configuration options for a smell detector
The name of the config field that specifies whether a smell is enabled. Set to true or false.
The name of the config field that sets scope-specific overrides for other values in the current smell detector’s configuration.
# File lib/reek/core/smell_configuration.rb, line 21 def adopt!(options) @options.adopt!(options) end
Is this smell detector active?
# File lib/reek/core/smell_configuration.rb, line 29 def enabled? @options[ENABLED_KEY] end
# File lib/reek/core/smell_configuration.rb, line 33 def overrides_for(context) Overrides.new(@options.fetch(OVERRIDES_KEY, {})).for_context(context) end
Retrieves the value, if any, for the given key.
Returns fall_back if this config has no value for the key.
# File lib/reek/core/smell_configuration.rb, line 41 def value(key, context, fall_back) overrides_for(context).each { |conf| return conf[key] if conf.has_key?(key) } return @options.fetch(key, fall_back) end
Generated with the Darkfish Rdoc Generator 2.