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



32
33
34
35
36
# File 'lib/sem/cli/orgs.rb', line 32

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

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

#listObject



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

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



48
49
50
51
52
# File 'lib/sem/cli/orgs.rb', line 48

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

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