Class: Sem::CLI::Orgs

Inherits:
Dracula
  • Object
show all
Defined in:
lib/sem/cli/orgs.rb

Instance Method Summary collapse

Instance Method Details

#info(org_name) ⇒ Object



15
16
17
18
19
# File 'lib/sem/cli/orgs.rb', line 15

def info(org_name)
  org = Sem::API::Org.find!(org_name)

  Sem::Views::Orgs.info(org)
end

#listObject



4
5
6
7
8
9
10
11
12
# File 'lib/sem/cli/orgs.rb', line 4

def list
  orgs = Sem::API::Org.all

  if !orgs.empty?
    Sem::Views::Orgs.list(orgs)
  else
    Sem::Views::Orgs.create_first_org
  end
end

#members(org_name) ⇒ Object



22
23
24
25
26
# File 'lib/sem/cli/orgs.rb', line 22

def members(org_name)
  org = Sem::API::Org.find!(org_name)

  Sem::Views::Users.list(org.users)
end