Method: GoodData::Command::Domain.list_users

Defined in:
lib/gooddata/commands/domain.rb

.list_users(domain_name, options = { :client => GoodData.connection }) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gooddata/commands/domain.rb', line 26

def list_users(domain_name, options = { :client => GoodData.connection })
  client = GoodData.connect(options)
  domain = client.domain(domain_name)

  rows = domain.users.to_a.map do |user|
    [user.email, user.full_name]
  end

  table = Terminal::Table.new :headings => ['Email', 'Full Name'], :rows => rows
  puts table
end