Class: Vpsb::Tasks::DropletSshKeys
- Includes:
- AskSupport
- Defined in:
- lib/vpsb/tasks/droplet_ssh_keys.rb
Instance Attribute Summary collapse
-
#core ⇒ Object
readonly
Returns the value of attribute core.
Attributes inherited from BaseTask
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(core) ⇒ DropletSshKeys
constructor
A new instance of DropletSshKeys.
Methods included from AskSupport
#ask, #ask_loop, #ask_to_confirm
Methods inherited from BaseTask
Constructor Details
#initialize(core) ⇒ DropletSshKeys
Returns a new instance of DropletSshKeys.
7 8 9 |
# File 'lib/vpsb/tasks/droplet_ssh_keys.rb', line 7 def initialize(core) @core = core end |
Instance Attribute Details
#core ⇒ Object (readonly)
Returns the value of attribute core.
5 6 7 |
# File 'lib/vpsb/tasks/droplet_ssh_keys.rb', line 5 def core @core end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/vpsb/tasks/droplet_ssh_keys.rb', line 13 def call prepare core.get(:ssh_helper).generate_ssh(core.get(:do_ssh_path)) puts core.get(:ssh_helper).pub_key(core.get(:do_ssh_path)) ask { puts "Visit https://cloud.digitalocean.com/ssh_keys and add add the key above. Press Enter to continue" } end |