Class: Garb::Management::Profile
- Inherits:
-
Object
- Object
- Garb::Management::Profile
- Includes:
- ProfileReports
- Defined in:
- lib/garb/management/profile.rb
Instance Attribute Summary (collapse)
-
- (Object) account_id
Returns the value of attribute account_id.
-
- (Object) id
Returns the value of attribute id.
-
- (Object) path
Returns the value of attribute path.
-
- (Object) session
Returns the value of attribute session.
-
- (Object) table_id
Returns the value of attribute table_id.
-
- (Object) title
Returns the value of attribute title.
-
- (Object) web_property_id
Returns the value of attribute web_property_id.
Class Method Summary (collapse)
- + (Object) all(session = Session, path = '/accounts/~all/webproperties/~all/profiles'))
- + (Object) for_account(account)
- + (Object) for_web_property(web_property)
- + (Object) new_from_entry(entry, session)
Instance Method Summary (collapse)
Methods included from ProfileReports
Instance Attribute Details
- (Object) account_id
Returns the value of attribute account_id
8 9 10 |
# File 'lib/garb/management/profile.rb', line 8 def account_id @account_id end |
- (Object) id
Returns the value of attribute id
8 9 10 |
# File 'lib/garb/management/profile.rb', line 8 def id @id end |
- (Object) path
Returns the value of attribute path
7 8 9 |
# File 'lib/garb/management/profile.rb', line 7 def path @path end |
- (Object) session
Returns the value of attribute session
7 8 9 |
# File 'lib/garb/management/profile.rb', line 7 def session @session end |
- (Object) table_id
Returns the value of attribute table_id
8 9 10 |
# File 'lib/garb/management/profile.rb', line 8 def table_id @table_id end |
- (Object) title
Returns the value of attribute title
8 9 10 |
# File 'lib/garb/management/profile.rb', line 8 def title @title end |
- (Object) web_property_id
Returns the value of attribute web_property_id
8 9 10 |
# File 'lib/garb/management/profile.rb', line 8 def web_property_id @web_property_id end |
Class Method Details
+ (Object) all(session = Session, path = '/accounts/~all/webproperties/~all/profiles'))
10 11 12 13 |
# File 'lib/garb/management/profile.rb', line 10 def self.all(session = Session, path = '/accounts/~all/webproperties/~all/profiles') feed = Feed.new(session, path) feed.entries.map {|entry| new_from_entry(entry, session)} end |
+ (Object) for_account(account)
15 16 17 |
# File 'lib/garb/management/profile.rb', line 15 def self.for_account(account) all(account.session, account.path+'/webproperties/~all/profiles') end |
+ (Object) for_web_property(web_property)
19 20 21 |
# File 'lib/garb/management/profile.rb', line 19 def self.for_web_property(web_property) all(web_property.session, web_property.path+'/profiles') end |
+ (Object) new_from_entry(entry, session)
23 24 25 26 27 28 29 |
# File 'lib/garb/management/profile.rb', line 23 def self.new_from_entry(entry, session) profile = new profile.session = session profile.path = Garb.parse_link(entry, "self").gsub(Feed::BASE_URL, '') profile.properties = Garb.parse_properties(entry) profile end |
Instance Method Details
- (Object) goals
39 40 41 |
# File 'lib/garb/management/profile.rb', line 39 def goals Goal.for_profile(self) end |
- (Object) properties=(properties)
31 32 33 34 35 36 37 |
# File 'lib/garb/management/profile.rb', line 31 def properties=(properties) self.id = properties['profile_id'] self.table_id = properties['dxp:table_id'] self.title = properties['profile_name'] self.account_id = properties['account_id'] self.web_property_id = properties['web_property_id'] end |