Sha256: c4dff743fb1349f8545cb3da5934409ab1b10741faae2b2335fd1ab506debe9c
Contents?: true
Size: 508 Bytes
Versions: 5
Compression:
Stored size: 508 Bytes
Contents
require 'terminal-table' module VagrantPlugins module Openstack module Command module Utils 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 def display_table(env, headers, rows) table = Terminal::Table.new headings: headers, rows: rows env[:ui].info("\n#{table}\n") end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems