class TableauServerClient::Resources::Group

Attributes

id[R]
name[R]
site_role[R]

Public Class Methods

from_collection_response(client, path, xml) { |from_response(client, "#{path}/#{id}", s)| ... } click to toggle source
# File lib/tableau_server_client/resources/group.rb, line 18
def self.from_collection_response(client, path, xml)
  xml.xpath("//xmlns:groups/xmlns:group").each do |s|
    id = s['id']
    yield from_response(client, "#{path}/#{id}", s)
  end
end
from_response(client, path, xml) click to toggle source
# File lib/tableau_server_client/resources/group.rb, line 10
def self.from_response(client, path, xml)
  attrs = extract_attributes(xml)
  if xml.xpath("xmlns:import")[0]
    attrs['site_role'] = xml.xpath("xmlns:import")[0]['siteRole']
  end
  new(client, path, attrs)
end

Public Instance Methods

users() click to toggle source
# File lib/tableau_server_client/resources/group.rb, line 25
def users
  @client.get_collection(User.location(path))
end