Class: RailsZero::CleanSiteJob

Inherits:
Object
  • Object
show all
Defined in:
app/jobs/rails_zero/clean_site_job.rb

Instance Method Summary collapse

Instance Method Details

#runObject



3
4
5
6
7
8
9
# File 'app/jobs/rails_zero/clean_site_job.rb', line 3

def run
  Dir[Rails.root.join('public', '**', '*').to_s].each do |f|
    if !excluded_files.include?(f) && File.exists?(f)
      FileUtils.rm_rf(f)
    end
  end
end