Class: CucumberTree::TempDir

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber_tree/temp_dir.rb

Class Method Summary collapse

Class Method Details

.clear!Object



6
7
8
9
10
# File 'lib/cucumber_tree/temp_dir.rb', line 6

def clear!
  tmp_path.children.each do |child|
    child.rmtree
  end
end

.file_name(name) ⇒ Object



12
13
14
# File 'lib/cucumber_tree/temp_dir.rb', line 12

def file_name(name)
  tmp_path.join(Time.now.to_f.to_s).tap(&:mkpath).join(name).to_path
end