Sha256: a72b21103604abdd279a2ae783e0330470a4bc00a370eb94e51b8cc7196b7e19
Contents?: true
Size: 865 Bytes
Versions: 4
Compression:
Stored size: 865 Bytes
Contents
# frozen_string_literal: true module OceanKit class Droplets < Thor desc "list", "Lists all droplers." def list puts underline_text("Droplets:\n") do_client.droplets.all.each_with_index do |droplet, index| puts "------------------------------\n" puts pastel.white.bold "#: ", pastel.clear.white(index + 1) puts pastel.white.bold "Name: ", pastel.clear.white(droplet.name) puts pastel.white.bold "ID: ", pastel.clear.white(droplet.id) puts pastel.white.bold "Public IP: ", pastel.clear.white(droplet.networks.v4.first.ip_address) puts pastel.white.bold "Region: ", pastel.clear.white(droplet.region.slug) puts pastel.white.bold "Status: ", pastel.clear.white(droplet.status) puts pastel.white.bold "Created: ", pastel.clear.white(droplet.created_at) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems