Class: Cachivache::RemoveStuffLibrariesCommand
- Inherits:
-
Command
- Object
- Command
- Cachivache::RemoveStuffLibrariesCommand
show all
- Defined in:
- lib/cachivache/remove-stuff-libraries-command.rb
Instance Method Summary
collapse
Methods inherited from Command
#current_folder, #gem_folder, #inform, #raise_error, run, #validate_cachivache_folder
Instance Method Details
#remove_library(library) ⇒ Object
13
14
15
16
|
# File 'lib/cachivache/remove-stuff-libraries-command.rb', line 13
def remove_library(library)
system "git submodule deinit --force #{library}"
system "git rm --force #{library}"
end
|
#run(libraries) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/cachivache/remove-stuff-libraries-command.rb', line 6
def run(libraries)
validate_cachivache_folder
raise_error 'You must give a library' if libraries.empty?
libraries.each { |library| remove_library library }
end
|