Class: Pod::Command::Repo::Remove
- Inherits:
 - 
      Pod::Command::Repo
      
        
- Object
 - CLAide::Command
 - Pod::Command
 - Pod::Command::Repo
 - Pod::Command::Repo::Remove
 
 
- Defined in:
 - lib/cocoapods/command/repo/remove.rb
 
Instance Method Summary collapse
- 
  
    
      #initialize(argv)  ⇒ Remove 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Remove.
 - #run ⇒ Object
 - #validate! ⇒ Object
 
Methods inherited from Pod::Command::Repo
Methods included from Executable
capture_command, capture_command!, #executable, execute_command, which, which!
Methods inherited from Pod::Command
#ensure_master_spec_repo_exists!, ensure_not_root_or_allowed!, options, report_error, run
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Remove
Returns a new instance of Remove.
      15 16 17 18  | 
    
      # File 'lib/cocoapods/command/repo/remove.rb', line 15 def initialize(argv) @name = argv.shift_argument super end  | 
  
Instance Method Details
#run ⇒ Object
      28 29 30 31 32  | 
    
      # File 'lib/cocoapods/command/repo/remove.rb', line 28 def run UI.section("Removing spec repo `#{@name}`") do FileUtils.rm_rf(dir) end end  | 
  
#validate! ⇒ Object
      20 21 22 23 24 25 26  | 
    
      # File 'lib/cocoapods/command/repo/remove.rb', line 20 def validate! super help! 'Deleting a repo needs a `NAME`.' unless @name help! "repo #{@name} does not exist" unless File.directory?(dir) help! "You do not have permission to delete the #{@name} repository." \ 'Perhaps try prefixing this command with sudo.' unless File.writable?(dir) end  |