Class: Pod::Command::RepoArt::Update

Inherits:
Pod::Command::RepoArt show all
Defined in:
lib/pod/command/repo_art/update.rb

Constant Summary collapse

UTIL =
Pod::RepoArt::RepoUtil

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::RepoArt

#init

Constructor Details

#initialize(argv) ⇒ Update

Returns a new instance of Update.



25
26
27
28
29
# File 'lib/pod/command/repo_art/update.rb', line 25

def initialize(argv)
  @name = argv.shift_argument
  @prune = argv.flag?('prune', false)
  super
end

Class Method Details

.optionsObject



15
16
17
18
19
# File 'lib/pod/command/repo_art/update.rb', line 15

def self.options
  [
      ['--prune', 'Prunes entries which do not exist in the remote this index was pulled from.']
  ].concat(super)
end

Instance Method Details

#runObject



38
39
40
# File 'lib/pod/command/repo_art/update.rb', line 38

def run
  update(@name, true)
end

#validate!Object



31
32
33
34
35
36
# File 'lib/pod/command/repo_art/update.rb', line 31

def validate!
  super
  unless @name
    help! 'This command requires a repo name to run.'
  end
end