Sha256: 031daf969db1fce4277f1397e78ca8304e5c348b7c8e98b216ce074ac165eac9
Contents?: true
Size: 652 Bytes
Versions: 1
Compression:
Stored size: 652 Bytes
Contents
Sunzi::Dependency.load('highline') module Sunzi module Cloud class Base include Sunzi::Utility def self.choose(cli, target) case target when 'linode' Cloud::Linode.new(cli) when 'ec2' Cloud::EC2.new(cli) when 'digital_ocean' Cloud::DigitalOcean.new(cli) else abort_with "#{target} is not valid!" end end def initialize(cli) @cli = cli @ui = HighLine.new end def ask(question, answer_type, &details) @ui.ask(@ui.color(question, :green, :bold), answer_type, &details) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sunzi-0.9.0 | lib/sunzi/cloud/base.rb |