Class: Cbratest::AffectedComponentFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/cobratest/affected_component_finder.rb

Instance Method Summary collapse

Instance Method Details

#find(components, changes) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/cobratest/affected_component_finder.rb', line 3

def find(components, changes)
  components.inject({}) do |memo, component|
    memo[component] = false
    changes.each do |change|
      if change.start_with? component[:options][:path]
        memo[component] = true
      end
    end
    memo
  end
end