Class: AtticCleanup::Storage::FolderFiles
- Inherits:
-
Object
- Object
- AtticCleanup::Storage::FolderFiles
- Defined in:
- lib/attic-cleanup/storage/folder_files.rb
Class Method Summary collapse
-
.find(files, number) ⇒ Object
Find the file by it’s ID.
Instance Method Summary collapse
- #all_files ⇒ Object
-
#all_files=(value) ⇒ Object
Select all files from the selected folder.
Class Method Details
.find(files, number) ⇒ Object
Find the file by it’s ID
16 17 18 19 20 21 22 23 24 |
# File 'lib/attic-cleanup/storage/folder_files.rb', line 16 def self.find(files, number) current_files = [] file_id = 0 files.each do |f| current_files[file_id] = f file_id += 1 end current_files[number] end |
Instance Method Details
#all_files ⇒ Object
5 6 7 |
# File 'lib/attic-cleanup/storage/folder_files.rb', line 5 def all_files @all_files end |
#all_files=(value) ⇒ Object
Select all files from the selected folder
10 11 12 13 |
# File 'lib/attic-cleanup/storage/folder_files.rb', line 10 def all_files= ( value ) Dir.chdir(value) @all_files = Dir.glob("*"); end |