Class: Bio::TwoBit::CachePath

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/twobit/cache_path.rb

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ CachePath

Returns a new instance of CachePath.



6
7
8
# File 'lib/bio/twobit/cache_path.rb', line 6

def initialize(id)
  @id = id
end

Instance Method Details

#base_dirObject



10
11
12
# File 'lib/bio/twobit/cache_path.rb', line 10

def base_dir
  Pathname(system_cache_dir).expand_path + "bio-twobit" + @id
end

#removeObject



14
15
16
# File 'lib/bio/twobit/cache_path.rb', line 14

def remove
  FileUtils.rmtree(base_dir.to_s, secure: true) if base_dir.exist?
end