class TestFriends::Tempfile::Destructor
Public Class Methods
new(dirname)
click to toggle source
# File lib/test_friends/tempfile.rb, line 85 def initialize dirname @pid = Process.pid @dir = Pathname.new dirname end
Public Instance Methods
call(*args)
click to toggle source
# File lib/test_friends/tempfile.rb, line 90 def call *args return if @pid != Process.pid STDERR.print "removing ", @dir.to_s, "..." if $DEBUG begin @dir.rmtree rescue Errno::ENOENT end STDERR.print "done\n" if $DEBUG end