Class: AstroSubframeOrganizer::Commands::Cleanup::EmptyDirectories

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
SharedOptions
Defined in:
lib/astro_subframe_organizer/commands/cleanup/empty_directories.rb

Instance Method Summary collapse

Methods included from SharedOptions

included, #setup

Instance Method Details

#call(dry_run: false, path: Dir.pwd, **options) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/astro_subframe_organizer/commands/cleanup/empty_directories.rb', line 17

def call(dry_run: false, path: Dir.pwd, **options)
  setup(**options.slice(:config, :verbose, :skip_confirm))
  AstroSubframeOrganizer::Utils::EmptyDirectoryCleaner.new(path).cleanup(
    dry_run: dry_run,
    verbose: options[:verbose],
  )
end