Class: GoogleAnalytics::Account
- Inherits:
-
Object
- Object
- GoogleAnalytics::Account
- Defined in:
- lib/google_analytics/account.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#profile_id ⇒ Object
readonly
Returns the value of attribute profile_id.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client, url, title, id, profile_id) ⇒ Account
constructor
A new instance of Account.
- #report(options = {}) ⇒ Object
Constructor Details
#initialize(client, url, title, id, profile_id) ⇒ Account
Returns a new instance of Account.
14 15 16 17 |
# File 'lib/google_analytics/account.rb', line 14 def initialize(client, url, title, id, profile_id) @client, @url, @title = client, url, title @id, @profile_id = id, profile_id end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/google_analytics/account.rb', line 4 def client @client end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/google_analytics/account.rb', line 4 def id @id end |
#profile_id ⇒ Object (readonly)
Returns the value of attribute profile_id.
4 5 6 |
# File 'lib/google_analytics/account.rb', line 4 def profile_id @profile_id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/google_analytics/account.rb', line 4 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/google_analytics/account.rb', line 4 def url @url end |
Class Method Details
.from_node(client, node) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/google_analytics/account.rb', line 6 def self.from_node(client, node) new client, node.xpath('.//xmlns:id').first.content, node.xpath('.//dxp:property[@name="ga:accountName"]', 'dxp' => DXP_NAMESPACE).first.attributes['value'].to_s, node.xpath('.//dxp:property[@name="ga:accountId"]', 'dxp' => DXP_NAMESPACE).first.attributes['value'].to_s, node.xpath('.//dxp:property[@name="ga:profileId"]', 'dxp' => DXP_NAMESPACE).first.attributes['value'].to_s end |