Class: Garb::Management::Profile
- Inherits:
-
Object
- Object
- Garb::Management::Profile
- Extended by:
- Attributes
- Includes:
- PathAttribute, ProfileReports
- Defined in:
- lib/garb/management/profile.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Class Method Summary collapse
- .all(session = Session, path = '/accounts/~all/webproperties/~all/profiles') ⇒ Object
- .for_account(account) ⇒ Object
- .for_web_property(web_property) ⇒ Object
Instance Method Summary collapse
- #goals ⇒ Object
-
#initialize(entry, session) ⇒ Profile
constructor
A new instance of Profile.
Methods included from Attributes
Methods included from PathAttribute
Methods included from ProfileReports
Constructor Details
#initialize(entry, session) ⇒ Profile
Returns a new instance of Profile.
25 26 27 28 |
# File 'lib/garb/management/profile.rb', line 25 def initialize(entry, session) @entry = entry @session = session end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
9 10 11 |
# File 'lib/garb/management/profile.rb', line 9 def session @session end |
Class Method Details
.all(session = Session, path = '/accounts/~all/webproperties/~all/profiles') ⇒ Object
12 13 14 15 |
# File 'lib/garb/management/profile.rb', line 12 def self.all(session = Session, path = '/accounts/~all/webproperties/~all/profiles') feed = Feed.new(session, path) feed.entries.map { |entry| new(entry, session) } end |
.for_account(account) ⇒ Object
17 18 19 |
# File 'lib/garb/management/profile.rb', line 17 def self.for_account(account) all(account.session, account.path + '/webproperties/~all/profiles') end |
.for_web_property(web_property) ⇒ Object
21 22 23 |
# File 'lib/garb/management/profile.rb', line 21 def self.for_web_property(web_property) all(web_property.session, web_property.path + '/profiles') end |
Instance Method Details
#goals ⇒ Object
30 31 32 |
# File 'lib/garb/management/profile.rb', line 30 def goals Goal.for_profile self end |