class Pod::Command::Repo::Remove

Public Class Methods

new(argv) click to toggle source
Calls superclass method Pod::Command::new
# File lib/cocoapods/command/repo/remove.rb, line 15
def initialize(argv)
  @name = argv.shift_argument
  super
end

Public Instance Methods

run() click to toggle source
# 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!() click to toggle source
Calls superclass method
# 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