Module: DevContext::Commands::Remove
- Included in:
- DevContext::CLI
- Defined in:
- lib/dev_context/commands/remove.rb
Instance Method Summary collapse
Instance Method Details
#cmd_remove ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dev_context/commands/remove.rb', line 6 def cmd_remove target = argv.shift return usage_error("dx remove CONTEXT|PATH") if blank?(target) context = matcher.resolve(target) return not_found(target) unless context name = context.fetch("name") config.active_stack.delete(name) config.contexts.delete(name) config.send(:save!) out.puts("Removed #{name}") 0 end |