Class: Analytics::WebProperty
- Inherits:
-
Object
- Object
- Analytics::WebProperty
- Defined in:
- lib/analytics/web_property.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(opts, access_token) ⇒ WebProperty
constructor
A new instance of WebProperty.
- #profiles ⇒ Object
Constructor Details
#initialize(opts, access_token) ⇒ WebProperty
5 6 7 8 9 10 11 |
# File 'lib/analytics/web_property.rb', line 5 def initialize(opts, access_token) @access_token = access_token @id = opts.fetch("id") @name = opts.fetch("name", "Not found") @account_id = opts.fetch("accountId") @url = opts.fetch("websiteUrl", "Not found") end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/analytics/web_property.rb', line 3 def account_id @account_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/analytics/web_property.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/analytics/web_property.rb', line 3 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/analytics/web_property.rb', line 3 def url @url end |
Instance Method Details
#profiles ⇒ Object
13 14 15 |
# File 'lib/analytics/web_property.rb', line 13 def profiles @profiles ||= request_profiles end |