Class: Reek::Overrides

Inherits:
Object show all
Defined in:
lib/reek/configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Overrides

Returns a new instance of Overrides.



42
43
44
# File 'lib/reek/configuration.rb', line 42

def initialize(hash)
  @hash = hash
end

Instance Method Details

#for_context(context) ⇒ Object



46
47
48
49
# File 'lib/reek/configuration.rb', line 46

def for_context(context)
  contexts = @hash.keys.select {|ckey| context.matches?([ckey])}
  contexts.map { |exc| @hash[exc] }
end