Module: FileUtil
- Defined in:
- lib/util/file_util.rb
Constant Summary collapse
- USER_HOME =
'user-home'.freeze
Class Method Summary collapse
Class Method Details
.to_local_file(file) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/util/file_util.rb', line 4 def self.to_local_file(file) local_file = File.absolute_path(file.dup) if local_file.include? Dir.home local_file[Dir.home] = USER_HOME elsif local_file.start_with?('/') local_file = local_file[1..] end local_file end |