class Reek::Overrides
A set of context-specific overrides for smell detectors.
Attributes
Public Class Methods
Source
# File lib/reek/smell_configuration.rb, line 51 def initialize(hash) @hash = hash end
Public Instance Methods
Source
# File lib/reek/smell_configuration.rb, line 56 def for_context(context) contexts = hash.keys.select { |ckey| context.matches?([ckey]) } contexts.map { |exc| hash[exc] } end
Find any overrides that match the supplied context