Class: Pod::Command::RepoSq::Remove

Inherits:
Pod::Command::RepoSq show all
Defined in:
lib/pod/command/repo_sq/remove.rb

Overview

Subclass of Pod::Command::RepoSq Provides support for the pod repo-sq remove command, which removes the targeted Square SDK repository from the user's cocoapods local repositories store.

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Remove

Returns a new instance of Remove



40
41
42
43
# File 'lib/pod/command/repo_sq/remove.rb', line 40

def initialize(argv)
  @name = argv.shift_argument
  super
end

Instance Method Details

#runObject

Removes a Square SDK repository from the current user CocoapodsRepoSq::RepositoryStore.



53
54
55
56
57
# File 'lib/pod/command/repo_sq/remove.rb', line 53

def run
  UI.section("Removing Square SDK repository `#{@name}`") do
    repository_store.remove(@name)
  end
end

#validate!Object

Validates that the required argument NAME is present.



46
47
48
49
# File 'lib/pod/command/repo_sq/remove.rb', line 46

def validate!
  super
  help! '`NAME` is required.' unless @name
end