Class: ActiveGit::FileDelete

Inherits:
FileEvent show all
Defined in:
lib/active_git/events/file_delete.rb

Instance Attribute Summary

Attributes inherited from FileEvent

#data

Instance Method Summary collapse

Methods inherited from FileEvent

#initialize

Constructor Details

This class inherits a constructor from ActiveGit::FileEvent

Instance Method Details

#synchronize(synchronizer) ⇒ Object



4
5
6
7
8
9
# File 'lib/active_git/events/file_delete.rb', line 4

def synchronize(synchronizer)
  synchronizer.define_job do
    ActiveGit.configuration.logger.debug "[ActiveGit] Deleting file #{file_name}"
    File.delete(file_name) if File.exist?(file_name)
  end
end