Class: TableauServerClient::Resources::Group
- Defined in:
- lib/tableau_server_client/resources/group.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#site_role ⇒ Object
readonly
Returns the value of attribute site_role.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
attr_reader, attributes, #attributes, #delete!, extract_attributes, extract_site_path, #initialize, location, #location, #path, plural_resource_name, resource_name, #server_url, #site_id, #site_path
Methods included from TableauServerClient::RequestBuilder
Constructor Details
This class inherits a constructor from TableauServerClient::Resources::Resource
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/tableau_server_client/resources/group.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/tableau_server_client/resources/group.rb', line 8 def name @name end |
#site_role ⇒ Object (readonly)
Returns the value of attribute site_role.
8 9 10 |
# File 'lib/tableau_server_client/resources/group.rb', line 8 def site_role @site_role end |
Class Method Details
.from_collection_response(client, path, xml) ⇒ Object
18 19 20 21 22 23 |
# 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) ⇒ Object
10 11 12 13 14 15 16 |
# 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 |