Class: Scatter::Commands::Remote::Rm
- Inherits:
-
SubCommand
- Object
- SubCommand
- Scatter::Commands::Remote::Rm
- Defined in:
- lib/scatter/commands/remote/rm.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(out, name) ⇒ Rm
constructor
A new instance of Rm.
Constructor Details
#initialize(out, name) ⇒ Rm
Returns a new instance of Rm.
5 6 7 8 |
# File 'lib/scatter/commands/remote/rm.rb', line 5 def initialize(out, name) super(out) @name = name end |
Instance Method Details
#execute! ⇒ Object
10 11 12 13 14 15 |
# File 'lib/scatter/commands/remote/rm.rb', line 10 def execute! remote = Scatter::Config.find_remote(@name) raise CommandLineError, "Remote #{@name} does not exist" unless remote Scatter::Config.remotes.delete(remote) Scatter::Config.save! end |