class TrelloFs::RepositoryCleaner

Public Class Methods

new(repository) click to toggle source
# File lib/trello-fs/repository_cleaner.rb, line 5
def initialize(repository)
  @repository = repository
end

Public Instance Methods

clean() click to toggle source
# File lib/trello-fs/repository_cleaner.rb, line 9
def clean
  Dir.entries(@repository.path).each do |path|
    next if path.start_with? '.'
    next if path == 'Attachments'

    FileUtils.rm_rf File.join(@repository.path, path)
  end
end