Class: Garb::Management::Account
- Inherits:
-
Object
- Object
- Garb::Management::Account
- Defined in:
- lib/garb/management/account.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entry, session) ⇒ Account
constructor
A new instance of Account.
- #profiles ⇒ Object
- #web_properties ⇒ Object
Constructor Details
#initialize(entry, session) ⇒ Account
Returns a new instance of Account.
13 14 15 16 17 18 19 20 21 |
# File 'lib/garb/management/account.rb', line 13 def initialize(entry, session) @session = session @path = Garb.parse_link(entry, "self").gsub(Feed::BASE_URL, '') @title = entry['title'].gsub('Google Analytics Account ', '') properties = Garb.parse_properties(entry) @id = properties["account_id"] @name = properties["account_name"] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/garb/management/account.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/garb/management/account.rb', line 5 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/garb/management/account.rb', line 4 def path @path end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
4 5 6 |
# File 'lib/garb/management/account.rb', line 4 def session @session end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/garb/management/account.rb', line 5 def title @title end |
Class Method Details
Instance Method Details
#profiles ⇒ Object
27 28 29 |
# File 'lib/garb/management/account.rb', line 27 def profiles @profiles ||= Profile.for_account(self) end |
#web_properties ⇒ Object
23 24 25 |
# File 'lib/garb/management/account.rb', line 23 def web_properties @web_properties ||= WebProperty.for_account(self) # will call path end |