Method: Ed::RepositoryCopy#initialize

Defined in:
lib/ed/repository_copy.rb

#initialize(path) ⇒ Ed::RepositoryCopy



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ed/repository_copy.rb', line 29

def initialize path
  @source   = path
  @path     = copy!
  @copy_dir = nil

  parent = Process.pid

  at_exit do
    if parent == Process.pid
      FileUtils.rm_rf(@path.to_s)
    end
  end
end