Class: Gemvault::CLI::Commands::Remove
- Inherits:
-
Gemvault::CLI::Command
- Object
- CommandKit::Command
- Gemvault::CLI::Command
- Gemvault::CLI::Commands::Remove
- Defined in:
- lib/gemvault/cli/commands/remove.rb
Instance Method Summary collapse
Instance Method Details
#run(vault, name, version = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gemvault/cli/commands/remove.rb', line 21 def run(vault, name, version = nil) with_vault(vault) do |v| count = v.remove(name, version) if count.zero? print_error("No matching gem found") exit(1) end puts "Removed #{count} gem(s)" end end |