Class: Pod::Sandbox::PodDirCleaner
- Inherits:
-
Object
- Object
- Pod::Sandbox::PodDirCleaner
- Defined in:
- lib/cocoapods/sandbox/pod_dir_cleaner.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#specs_by_platform ⇒ Object
readonly
Returns the value of attribute specs_by_platform.
Instance Method Summary collapse
-
#clean! ⇒ void
Removes all the files not needed for the installation according to the specs by platform.
-
#initialize(root, specs_by_platform) ⇒ PodDirCleaner
constructor
A new instance of PodDirCleaner.
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
#root ⇒ Object (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_platform ⇒ Object (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 |