Class: Analytics::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/analytics/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts, access_token) ⇒ Account

Returns a new instance of Account.



5
6
7
8
9
# File 'lib/analytics/account.rb', line 5

def initialize(opts, access_token)
   @name = opts.fetch("name")
   @id = opts.fetch("id")
   @access_token = access_token
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/analytics/account.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/analytics/account.rb', line 3

def name
  @name
end

Instance Method Details

#flush!Object



15
16
17
# File 'lib/analytics/account.rb', line 15

def flush!
  @web_properties = nil
end

#web_propertiesObject



11
12
13
# File 'lib/analytics/account.rb', line 11

def web_properties
  @web_properties ||= request_web_properties
end