Class: Legato::Management::Goal
- Inherits:
-
Object
- Object
- Legato::Management::Goal
show all
- Extended by:
- Finder
- Includes:
- Model
- Defined in:
- lib/legato/management/goal.rb
Constant Summary
collapse
- GA_ATTRIBUTES =
{
:id => 'id',
:name => 'name',
:account_id => 'accountId',
:web_property_id => 'webPropertyId',
:profile_id => 'profileId'
}
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Finder
all, base_uri, get
Methods included from Model
#build, included, #initialize
Class Method Details
.default_path ⇒ Object
7
8
9
|
# File 'lib/legato/management/goal.rb', line 7
def self.default_path
"/accounts/~all/webproperties/~all/profiles/~all/goals"
end
|
.for_account(account) ⇒ Object
25
26
27
|
# File 'lib/legato/management/goal.rb', line 25
def self.for_account(account)
all(account.user, account.path+'/webproperties/~all/profiles/~all/goals')
end
|
.for_profile(profile) ⇒ Object
33
34
35
|
# File 'lib/legato/management/goal.rb', line 33
def self.for_profile(profile)
all(profile.user, profile.path+'/goals')
end
|
.for_web_property(web_property) ⇒ Object
29
30
31
|
# File 'lib/legato/management/goal.rb', line 29
def self.for_web_property(web_property)
all(web_property.user, web_property.path+'/profiles/~all/goals')
end
|
Instance Method Details
#path ⇒ Object
11
12
13
|
# File 'lib/legato/management/goal.rb', line 11
def path
self.class.default_path + "/" + id.to_s
end
|