Class: Oc::Run::Regions
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
description, example, get_object_name, meta, method_added, option, options, summary, syntax
Instance Method Details
#run ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/system/run/commands/regions.rb', line 5 def run result = .region.all if !result.success? puts "Error: Please check your information".red else puts "Regions".yellow droplets = [] droplets << [ 'ID', 'Name' ] result.regions.each do |region| droplets << [ region.slug, region.name.to_s.red, ] end table = Terminal::Table.new :rows => droplets puts table end end |