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