Class: Reek::Overrides
Instance Method Summary collapse
- #for_context(context) ⇒ Object
-
#initialize(hash) ⇒ Overrides
constructor
A new instance of Overrides.
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 |