Class: Legato::Management::Profile
Constant Summary
collapse
- GA_ATTRIBUTES =
{
:id => 'id',
:name => 'name',
:account_id => 'accountId',
:web_property_id => 'webPropertyId'
}
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Finder
all, base_uri, get
Methods included from Model
#build, included, #initialize
add_profile_method, method_name_from_klass
Instance Attribute Details
#account ⇒ Object
35
36
37
|
# File 'lib/legato/management/profile.rb', line 35
def account
@account ||= Account.from_child(self)
end
|
#web_property ⇒ Object
39
40
41
|
# File 'lib/legato/management/profile.rb', line 39
def web_property
@web_property ||= WebProperty.from_child(self)
end
|
Class Method Details
.build_from_summary(attributes, user, account, web_property) ⇒ Object
47
48
49
50
51
52
|
# File 'lib/legato/management/profile.rb', line 47
def self.build_from_summary(attributes, user, account, web_property)
Profile.new(attributes, user).tap { |profile|
profile.account = account
profile.web_property = web_property
}
end
|
.default_path ⇒ Object
8
9
10
|
# File 'lib/legato/management/profile.rb', line 8
def self.default_path
"/accounts/~all/webproperties/~all/profiles"
end
|
.for_account(account) ⇒ Object
27
28
29
|
# File 'lib/legato/management/profile.rb', line 27
def self.for_account(account)
all(account.user, account.path+'/webproperties/~all/profiles')
end
|
.for_web_property(web_property) ⇒ Object
31
32
33
|
# File 'lib/legato/management/profile.rb', line 31
def self.for_web_property(web_property)
all(web_property.user, web_property.path+'/profiles')
end
|
Instance Method Details
#goals ⇒ Object
43
44
45
|
# File 'lib/legato/management/profile.rb', line 43
def goals
Goal.for_profile(self)
end
|
#path ⇒ Object
12
13
14
|
# File 'lib/legato/management/profile.rb', line 12
def path
"/accounts/#{account_id}/webproperties/#{web_property_id}/profiles/#{id}"
end
|