class Sem::Views::Orgs

Public Class Methods

create_first_org() click to toggle source
# File lib/sem/views/orgs.rb, line 3
def self.create_first_org
  puts "You don't belong to any organization."
  puts ""
  puts "Create your first organization: https://semaphoreci.com/organizations/new."
  puts ""
end
info(org) click to toggle source
# File lib/sem/views/orgs.rb, line 20
def self.info(org)
  print_table [
    ["ID", org.id],
    ["Name", org.username],
    ["Created", org.created_at],
    ["Updated", org.updated_at]
  ]
end
list(orgs) click to toggle source
# File lib/sem/views/orgs.rb, line 10
def self.list(orgs)
  header = ["ID", "NAME"]

  body = orgs.map do |org|
    [org.id, org.username]
  end

  print_table [header, *body]
end