Class: OneCmd::Command::Xcode::RmDerivedData

Inherits:
OneCmd::Command::Xcode show all
Defined in:
lib/onecmd/command/xcode/rm_derived_data.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OneCmd::Command::Xcode

#dir

Methods inherited from OneCmd::Command

run

Constructor Details

#initialize(argv) ⇒ RmDerivedData

Returns a new instance of RmDerivedData.



15
16
17
18
# File 'lib/onecmd/command/xcode/rm_derived_data.rb', line 15

def initialize(argv)
  @count_only = argv.flag?('count-only')
  super
end

Class Method Details

.optionsObject



11
12
13
# File 'lib/onecmd/command/xcode/rm_derived_data.rb', line 11

def self.options
  [['--count-only', 'Show the total number of repos']].concat(super)
end

Instance Method Details

#runObject



20
21
22
23
24
# File 'lib/onecmd/command/xcode/rm_derived_data.rb', line 20

def run
  path = "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData"
  FileUtils.rm_rf(path)
  puts "✅ rm derived data: #{path}"
end