Class: Bio::TwoBit::CachePath
- Inherits:
-
Object
- Object
- Bio::TwoBit::CachePath
- Defined in:
- lib/bio/twobit/cache_path.rb
Instance Method Summary collapse
- #base_dir ⇒ Object
-
#initialize(id) ⇒ CachePath
constructor
A new instance of CachePath.
- #remove ⇒ Object
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_dir ⇒ Object
10 11 12 |
# File 'lib/bio/twobit/cache_path.rb', line 10 def base_dir Pathname(system_cache_dir). + "bio-twobit" + @id end |
#remove ⇒ Object
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 |