Sha256: 8ffca19cf22acebc680a201294bcb353c3a2302a9228f5c49d41decc5d73da3a
Contents?: true
Size: 669 Bytes
Versions: 8
Compression:
Stored size: 669 Bytes
Contents
require 'terminal-table' module VagrantPlugins module Deltacloud 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 def get_ip_address(env) details = env[:deltacloud_client].get_instance_details(env, env[:machine].id) details.ip_address end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems