Class: Pod::Command::Trunk::Delete

Inherits:
Pod::Command::Trunk show all
Defined in:
lib/pod/command/trunk/delete.rb

Constant Summary

Constants inherited from Pod::Command::Trunk

BASE_URL, SCHEME_AND_HOST

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Delete

Returns a new instance of Delete.



22
23
24
25
26
# File 'lib/pod/command/trunk/delete.rb', line 22

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

Instance Method Details

#runObject



34
35
36
37
38
# File 'lib/pod/command/trunk/delete.rb', line 34

def run
  return unless confirm_deletion?
  json = delete
  print_messages(json['data_url'], json['messages'], nil, nil)
end

#validate!Object



28
29
30
31
32
# File 'lib/pod/command/trunk/delete.rb', line 28

def validate!
  super
  help! 'Please specify a pod name.' unless @name
  help! 'Please specify a version.' unless @version
end