Class: Pod::Command::Cache::Proxy::Auth::Remove
- Inherits:
-
Pod::Command::Cache::Proxy::Auth
- Object
- Pod::Command
- Pod::Command::Cache
- Pod::Command::Cache::Proxy
- Pod::Command::Cache::Proxy::Auth
- Pod::Command::Cache::Proxy::Auth::Remove
- Defined in:
- lib/cocoapods-cache-proxy/command/cache_proxy/auth/remove.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Remove
constructor
A new instance of Remove.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command::Cache::Proxy::Auth
Methods inherited from Pod::Command::Cache::Proxy
Constructor Details
#initialize(argv) ⇒ Remove
Returns a new instance of Remove.
19 20 21 22 23 24 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/auth/remove.rb', line 19 def initialize(argv) init @host = argv.shift_argument @silent = argv.flag?('silent', false) super end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/auth/remove.rb', line 31 def run raise Pod::Informative.exception "`#{@host}` 不存在" unless CPSH.check_auth_conf_exists(@host) UI.section("remove cache proxy auth `#{@host}`".green) do CPSH.remove_cache_proxy_auth(@host) end end |
#validate! ⇒ Object
26 27 28 29 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/auth/remove.rb', line 26 def validate! super help! 'This command requires both a auth host.' unless @host end |