class Pod::Command::Trunk::RemoveOwner

@CocoaPods 0.33.0

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/pod/command/trunk/remove_owner.rb, line 20
def initialize(argv)
  @pod = argv.shift_argument
  @email = argv.shift_argument
  super
end

Public Instance Methods

run() click to toggle source
# File lib/pod/command/trunk/remove_owner.rb, line 36
def run
  json = json(request_path(:delete, "pods/#{@pod}/owners/#{@email}", auth_headers))
  UI.labeled 'Owners', json.map { |o| "#{o['name']} <#{o['email']}>" }
rescue REST::Error => e
  raise Informative, "There was an error removing #{@email} from " \
                           "#{@pod} on trunk: #{e.message}"
end
validate!() click to toggle source
Calls superclass method
# File lib/pod/command/trunk/remove_owner.rb, line 26
def validate!
  super
  unless token
    help! 'You need to register a session first.'
  end
  unless @pod && @email
    help! 'Specify the pod name and the owner’s email address.'
  end
end