Module: Avm::RunnerWith::FilesystemRenamer
- Defined in:
- lib/avm/runner_with/filesystem_renamer.rb
Defined Under Namespace
Modules: PrependMethods Classes: RenameFile
Constant Summary collapse
- FILE_WRAPPER_CLASS_BASENAME =
'FileWrapper'
Instance Method Summary collapse
Instance Method Details
#file_class ⇒ Class
67 68 69 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 67 def file_class self.class.const_get(FILE_WRAPPER_CLASS_BASENAME) end |
#rename_files ⇒ void
This method returns an undefined value.
87 88 89 90 91 92 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 87 def rename_files return if parsed.no? || files.none?(&:rename?) infom 'Renaming files...' files.each(&:rename) end |
#run_filesystem_renamer ⇒ void
This method returns an undefined value.
72 73 74 75 76 77 78 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 72 def run_filesystem_renamer self.files = [] run_filesystem_traverser show_files rename_files success 'Done' end |
#show_files ⇒ void
This method returns an undefined value.
81 82 83 84 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 81 def show_files infov 'Files found', files.count files.each(&:show) end |