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
30 31 32 33 34 35 36 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/remove.rb', line 30 def run raise Pod::Informative.exception "`#{@name}` 不存在" unless CPSH.check_source_conf_exists(@name) UI.section("Remove cache proxy repo `#{@name}`".green) do CPSH.remove_cache_proxy_source(@name) end end |
#validate! ⇒ Object
25 26 27 28 |
# File 'lib/cocoapods-cache-proxy/command/cache_proxy/remove.rb', line 25 def validate! super help! 'This command requires both a repo name.' unless @name end |