Class: Pod::Command::RepoSq::Update

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Update

Returns a new instance of Update



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

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

Instance Method Details

#runObject

Updates the podspecs of Square SDK repository on the current user CocoapodsRepoSq::RepositoryStore.



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

def run
  UI.section("Updating Square SDK repository `#{@name}`") do
    repository = repository_store.get(@name)
    repository.update_specs
  end
end

#validate!Object

Validates that the required argument NAME is present.



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

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