Module: Viiite::BDB::Utils
- Included in:
- Viiite::BDB, Cached, Immediate
- Defined in:
- lib/viiite/bdb/utils.rb
Instance Method Summary collapse
Instance Method Details
#bench_file(folder, name, ext) ⇒ Object
10 11 12 |
# File 'lib/viiite/bdb/utils.rb', line 10 def bench_file(folder, name, ext) File.join(folder, replace_extension(name, ext)) end |
#replace_extension(file, ext) ⇒ Object
5 6 7 8 |
# File 'lib/viiite/bdb/utils.rb', line 5 def replace_extension(file, ext) old_ext = File.extname(file) "#{file[0..-(1+old_ext.size)]}#{ext}" end |