Sha256: 8d16e118c38ccb927be070b80584c0b3466e74931c137373a32e92c854395e32
Contents?: true
Size: 512 Bytes
Versions: 1
Compression:
Stored size: 512 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-openstack-provider-0.3.0 | lib/vagrant-openstack-provider/command/utils.rb |