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
69 70 71 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 69 def file_class self.class.const_get(FILE_WRAPPER_CLASS_BASENAME) end |
#rename_files ⇒ void
This method returns an undefined value.
89 90 91 92 93 94 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 89 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.
74 75 76 77 78 79 80 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 74 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.
83 84 85 86 |
# File 'lib/avm/runner_with/filesystem_renamer.rb', line 83 def show_files infov 'Files found', files.count files.each(&:show) end |