Module: OnlyofficeS3Wrapper::PathHelper
- Included in:
- AmazonS3Wrapper
- Defined in:
- lib/onlyoffice_s3_wrapper/path_helper.rb
Overview
Module for method to work with paths
Instance Method Summary collapse
-
#bucket_file_path(filename, folder) ⇒ String
Correct full path to file.
Instance Method Details
#bucket_file_path(filename, folder) ⇒ String
Returns correct full path to file.
9 10 11 12 13 14 15 |
# File 'lib/onlyoffice_s3_wrapper/path_helper.rb', line 9 def bucket_file_path(filename, folder) return filename unless folder folder = folder.sub('/', '') if folder[0] == '/' folder = folder.chop if folder?(folder) "#{folder}/#{filename}" end |