Class: Vpsb::Tasks::DropletSshUpdateConfig

Inherits:
BaseTask
  • Object
show all
Includes:
AskSupport
Defined in:
lib/vpsb/tasks/droplet_ssh_update_config.rb

Instance Attribute Summary collapse

Attributes inherited from BaseTask

#prepare_squence

Instance Method Summary collapse

Methods included from AskSupport

#ask, #ask_loop, #ask_to_confirm

Methods inherited from BaseTask

prepare_squence

Constructor Details

#initialize(core) ⇒ DropletSshUpdateConfig

Returns a new instance of DropletSshUpdateConfig.



7
8
9
# File 'lib/vpsb/tasks/droplet_ssh_update_config.rb', line 7

def initialize(core)
  @core = core
end

Instance Attribute Details

#coreObject (readonly)

Returns the value of attribute core.



5
6
7
# File 'lib/vpsb/tasks/droplet_ssh_update_config.rb', line 5

def core
  @core
end

Instance Method Details

#callObject



13
14
15
16
# File 'lib/vpsb/tasks/droplet_ssh_update_config.rb', line 13

def call
  prepare
  core.get(:ssh_helper).add_host_to_config(core.get(:do_host_ip), core.get(:do_ssh_pub_path), 'root')
end