Class: CloudRunner::DigitalOcean::Cli::New
- Defined in:
- lib/cloud_runner/digital_ocean/cli/new.rb
Constant Summary collapse
- SHORT_HOST_IMAGE_NAMES =
{ "ubuntu-10-04" => "Ubuntu 10.04 x64 Server", "ubuntu-12-04" => "Ubuntu 12.04 x64 Server", "centos-6-3" => "CentOS 6.3 x64", }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ New
constructor
A new instance of New.
Methods inherited from Base
Constructor Details
#initialize(opts = {}) ⇒ New
Returns a new instance of New.
12 13 14 15 16 17 18 19 20 |
# File 'lib/cloud_runner/digital_ocean/cli/new.rb', line 12 def initialize(opts={}) super raise "Host image must be specified" \ unless @host_image = [:host_image] raise "Host image is not available" \ unless @image_name = SHORT_HOST_IMAGE_NAMES[@host_image] end |