Class: Vpsb::Resources::DoSize

Inherits:
BaseResource show all
Includes:
AskSupport, ShellSupport
Defined in:
lib/vpsb/resources/do_size.rb

Instance Method Summary collapse

Methods included from ShellSupport

#in_dir

Methods included from AskSupport

#ask, #ask_loop, #ask_to_confirm

Instance Method Details

#call(core) ⇒ Object



8
9
10
11
12
13
# File 'lib/vpsb/resources/do_size.rb', line 8

def call(core)
  puts "Loading list of available disc sizes"
  in_dir(core.get(:server_app_path), 'knife digital_ocean size list')
  answer = ask { puts 'What size? Enter its id (default: 66)' }.strip
  answer.empty? ? '66' : answer
end