Class: Pod::Sandbox::PodDirCleaner

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/sandbox/pod_dir_cleaner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, specs_by_platform) ⇒ PodDirCleaner

Returns a new instance of PodDirCleaner.



7
8
9
10
# File 'lib/cocoapods/sandbox/pod_dir_cleaner.rb', line 7

def initialize(root, specs_by_platform)
  @root = root
  @specs_by_platform = specs_by_platform
end

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



4
5
6
# File 'lib/cocoapods/sandbox/pod_dir_cleaner.rb', line 4

def root
  @root
end

#specs_by_platformObject (readonly)

Returns the value of attribute specs_by_platform.



5
6
7
# File 'lib/cocoapods/sandbox/pod_dir_cleaner.rb', line 5

def specs_by_platform
  @specs_by_platform
end

Instance Method Details

#clean!void

This method returns an undefined value.

Removes all the files not needed for the installation according to the specs by platform.



17
18
19
# File 'lib/cocoapods/sandbox/pod_dir_cleaner.rb', line 17

def clean!
  clean_paths.each { |path| FileUtils.rm_rf(path) } if root.exist?
end