Class: FileSorterTool::FileSorter
- Inherits:
-
Object
- Object
- FileSorterTool::FileSorter
- Defined in:
- lib/file_sorter_tool/file_sorter.rb
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/file_sorter_tool/file_sorter.rb', line 8 def process return if File.directory?(@from_path) to_file_path = "#{@to_dir_path}/#{@from_file}" create_directory new_file_name = get_new_file_name(to_file_path, @from_file) rename_and_move_files(new_file_name) end |