Class: Ec2ssh::Command::Remove

Inherits:
Base
  • Object
show all
Defined in:
lib/ec2ssh/command/remove.rb

Instance Attribute Summary

Attributes inherited from Base

#cli

Instance Method Summary collapse

Methods inherited from Base

#dotfile, #dotfile_path, #ssh_config_path

Constructor Details

#initialize(cli) ⇒ Remove

Returns a new instance of Remove.



8
9
10
# File 'lib/ec2ssh/command/remove.rb', line 8

def initialize(cli)
  super
end

Instance Method Details

#runObject

Raises:



12
13
14
15
16
17
# File 'lib/ec2ssh/command/remove.rb', line 12

def run
  ssh_config = SshConfig.new(ssh_config_path)
  raise MarkNotFound unless ssh_config.mark_exist?

  ssh_config.replace! ""
end