Class: Pod::Command::Cache::Proxy::Remove
- Inherits:
-
Pod::Command::Cache::Proxy
- Object
- Pod::Command
- Pod::Command::Cache
- Pod::Command::Cache::Proxy
- Pod::Command::Cache::Proxy::Remove
- Defined in:
- lib/cocoapods-cache-proxy/command/cache_proxy/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
Constructor Details
#initialize(argv) ⇒ Remove
Returns a new instance of Remove.
18 19 20 21 22 23 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/remove.rb', line 18 def initialize(argv) init @name = argv.shift_argument @silent = argv.flag?('silent', false) super end |
Instance Method Details
#run ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/remove.rb', line 32 def run raise Pod::Informative.exception "`#{@name}` 不存在" unless CPSH.check_cache_proxy_source_conf_exists(@name) UI.section("remove cache proxy repo `#{@name}`") do CPSH.remove_cache_proxy_source(@name) end end |
#validate! ⇒ Object
25 26 27 28 29 30 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/remove.rb', line 25 def validate! super unless @name help! 'This command requires both a repo name.' end end |