Class: GitCompound::Worker::LocalChangesGuard
- Defined in:
- lib/git_compound/worker/local_changes_guard.rb
Overview
Worker that defends local changes in component repositories
Instance Method Summary collapse
-
#initialize(lock) ⇒ LocalChangesGuard
constructor
A new instance of LocalChangesGuard.
- #visit_component(component) ⇒ Object
Methods inherited from Worker
Constructor Details
#initialize(lock) ⇒ LocalChangesGuard
Returns a new instance of LocalChangesGuard.
7 8 9 |
# File 'lib/git_compound/worker/local_changes_guard.rb', line 7 def initialize(lock) @lock = lock end |
Instance Method Details
#visit_component(component) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/git_compound/worker/local_changes_guard.rb', line 11 def visit_component(component) return unless component.exists? @component = component @repository = component.repository check_uncommited_changes! check_untracked_files! end |