class Pod::Command::RepoArt::Remove

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/pod/command/repo_art/remove.rb, line 15
def initialize(argv)
  init
  @name = argv.shift_argument
  super
end

Public Instance Methods

repo_dir_root() click to toggle source
# File lib/pod/command/repo_art/remove.rb, line 35
def repo_dir_root
  "#{@repos_art_dir}/#{@name}"
end
run() click to toggle source
# File lib/pod/command/repo_art/remove.rb, line 29
def run
  UI.section("Removing spec repo `#{@name}`") do
    FileUtils.rm_rf(repo_dir_root)
  end
end
validate!() click to toggle source
Calls superclass method
# File lib/pod/command/repo_art/remove.rb, line 21
def validate!
  super
  help! 'Deleting a repo needs a `NAME`.' unless @name
  help! "repo #{@name} does not exist" unless File.directory?(repo_dir_root)
  help! "You do not have permission to delete the #{@name} repository." \
        'Perhaps try prefixing this command with sudo.' unless File.writable?(repo_dir_root)
end