Class: AstroSubframeOrganizer::Commands::Cleanup::Thumbnails

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

Constant Summary collapse

THUMBNAIL_PATTERN =
AstroSubframeOrganizer::Utils::ThumbnailCleaner::ASIAIR_THUMBNAIL_PATTERN

Instance Method Summary collapse

Methods included from SharedOptions

included, #setup

Instance Method Details

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



27
28
29
30
31
32
33
34
# File 'lib/astro_subframe_organizer/commands/cleanup/thumbnails.rb', line 27

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