Class: MacCleaner::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/mac_cleaner/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/mac_cleaner/cli.rb', line 34

def self.exit_on_failure?
  false
end

Instance Method Details

#analyze(path = "~") ⇒ Object



28
29
30
31
32
# File 'lib/mac_cleaner/cli.rb', line 28

def analyze(path = "~")
  require_relative 'analyzer'
  analyzer = MacCleaner::Analyzer.new(path: path)
  analyzer.analyze
end

#cleanObject



12
13
14
15
16
17
18
19
20
# File 'lib/mac_cleaner/cli.rb', line 12

def clean
  require_relative 'cleaner'
  cleaner = MacCleaner::Cleaner.new(
    dry_run: options[:dry_run],
    sudo: options[:sudo],
    interactive: options[:interactive]
  )
  cleaner.clean
end

#versionObject



23
24
25
# File 'lib/mac_cleaner/cli.rb', line 23

def version
  puts MacCleaner::VERSION
end