Class: WsdlMapperTesting::TmpPath

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl_mapper_testing/tmp_path.rb

Instance Method Summary collapse

Constructor Details

#initializeTmpPath

Returns a new instance of TmpPath.



3
4
5
6
# File 'lib/wsdl_mapper_testing/tmp_path.rb', line 3

def initialize
  @path = File.join ::TEST_TMP_PATH, SecureRandom.hex(5)
  FileUtils.mkdir_p @path
end

Instance Method Details

#join(*args) ⇒ Object



8
9
10
# File 'lib/wsdl_mapper_testing/tmp_path.rb', line 8

def join(*args)
  File.join @path, *args
end

#to_sObject



12
13
14
# File 'lib/wsdl_mapper_testing/tmp_path.rb', line 12

def to_s
  @path
end


16
17
18
# File 'lib/wsdl_mapper_testing/tmp_path.rb', line 16

def unlink
  FileUtils.rm_rf @path
end