Class: GitCompound::Worker::ConflictingDependencyChecker

Inherits:
Worker
  • Object
show all
Defined in:
lib/git_compound/worker/conflicting_dependency_checker.rb

Overview

Worker that detects conflicting dependencies

Instance Method Summary collapse

Methods inherited from Worker

#visit_manifest, #visit_task

Constructor Details

#initializeConflictingDependencyChecker

Returns a new instance of ConflictingDependencyChecker.



6
7
8
# File 'lib/git_compound/worker/conflicting_dependency_checker.rb', line 6

def initialize
  @components = []
end

Instance Method Details

#visit_component(component) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/git_compound/worker/conflicting_dependency_checker.rb', line 10

def visit_component(component)
  if conflict_exists?(component)
    raise ConflictingDependencyError,
          "Conflicting dependency detected in component `#{component.name}`!"
  end
  @components << component
end