Class: VagrantPlugins::ProfitBricks::Command::ListFlavors
- Inherits:
-
Object
- Object
- VagrantPlugins::ProfitBricks::Command::ListFlavors
- Includes:
- Utils
- Defined in:
- lib/vagrant-profitbricks/command/flavors.rb
Instance Method Summary collapse
Methods included from Utils
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant-profitbricks/command/flavors.rb', line 10 def execute opts = OptionParser.new do |o| o. = 'Usage: vagrant profitbricks flavors [options]' end argv = (opts) return unless argv compute = fog_pb(argv[0]) rows = [] compute.flavors.sort_by(&:id).each do |flavor| rows << [ flavor.id, flavor.name ] end display_table(@env, %w[ID Name], rows) end |