Sha256: 69a8259234a1fbb53423070057575deb85d50c5a5b8860e25713972ee969d99e
Contents?: true
Size: 503 Bytes
Versions: 6
Compression:
Stored size: 503 Bytes
Contents
require 'terminal-table' module VagrantPlugins module ConoHa 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}") end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems