module VagrantPlugins::Openstack::Command::Utils
Public Instance Methods
display_item_list(env, items)
click to toggle source
# File lib/vagrant-openstack-provider/command/utils.rb, line 7 def display_item_list(env, items) rows = [] items.each do |item| rows << [item.id, item.name] end display_table(env, %w(ID Name), rows) end
display_table(env, headers, rows)
click to toggle source
# File lib/vagrant-openstack-provider/command/utils.rb, line 15 def display_table(env, headers, rows) table = Terminal::Table.new headings: headers, rows: rows env[:ui].info("\n#{table}") end