Sha256: d3dcefa394ceef8642165f3aa864aa308c37176e4421fcf8c8622c514ba5db11
Contents?: true
Size: 546 Bytes
Versions: 5
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true require_relative 'file_handler' require_relative 'file_order' module OrganizeFiles # organizer.rb class Organizer attr_reader :directory, :types, :new_folder, :new_path def initialize(directory) @directory = directory @file_handler = FileHandler.new(directory) end def organize @file_handler.scan_files.each do |file| categorize_file = OrganizeFiles::FileOrder.new(file).categorize @file_handler.move_file(file, categorize_file) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems