Class: GosquaredRails::Configuration
- Inherits:
-
Object
- Object
- GosquaredRails::Configuration
- Defined in:
- lib/configuration.rb
Instance Attribute Summary collapse
-
#anonymize_ip ⇒ Object
Returns the value of attribute anonymize_ip.
-
#cookie_domain ⇒ Object
Returns the value of attribute cookie_domain.
-
#custom_properties ⇒ Object
Returns the value of attribute custom_properties.
-
#identified_user ⇒ Object
Returns the value of attribute identified_user.
-
#referrer ⇒ Object
Returns the value of attribute referrer.
-
#site_token ⇒ Object
Returns the value of attribute site_token.
-
#track_hash ⇒ Object
Returns the value of attribute track_hash.
-
#track_local ⇒ Object
Returns the value of attribute track_local.
-
#track_params ⇒ Object
Returns the value of attribute track_params.
-
#use_cookies ⇒ Object
Returns the value of attribute use_cookies.
Instance Method Summary collapse
- #config_options ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_anonymize_ip ⇒ Object
- #set_cookie_domain ⇒ Object
- #set_referrer ⇒ Object
- #set_track_hash ⇒ Object
- #set_track_local ⇒ Object
- #set_track_params ⇒ Object
- #set_use_cookies ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/configuration.rb', line 6 def initialize @site_token = nil @track_local = nil @anonymize_ip = nil @cookie_domain = nil @use_cookies = nil @referrer = nil @track_hash = nil @track_params = nil @identified_user = nil @custom_properties = nil end |
Instance Attribute Details
#anonymize_ip ⇒ Object
Returns the value of attribute anonymize_ip.
3 4 5 |
# File 'lib/configuration.rb', line 3 def anonymize_ip @anonymize_ip end |
#cookie_domain ⇒ Object
Returns the value of attribute cookie_domain.
3 4 5 |
# File 'lib/configuration.rb', line 3 def @cookie_domain end |
#custom_properties ⇒ Object
Returns the value of attribute custom_properties.
3 4 5 |
# File 'lib/configuration.rb', line 3 def custom_properties @custom_properties end |
#identified_user ⇒ Object
Returns the value of attribute identified_user.
3 4 5 |
# File 'lib/configuration.rb', line 3 def identified_user @identified_user end |
#referrer ⇒ Object
Returns the value of attribute referrer.
3 4 5 |
# File 'lib/configuration.rb', line 3 def referrer @referrer end |
#site_token ⇒ Object
Returns the value of attribute site_token.
3 4 5 |
# File 'lib/configuration.rb', line 3 def site_token @site_token end |
#track_hash ⇒ Object
Returns the value of attribute track_hash.
3 4 5 |
# File 'lib/configuration.rb', line 3 def track_hash @track_hash end |
#track_local ⇒ Object
Returns the value of attribute track_local.
3 4 5 |
# File 'lib/configuration.rb', line 3 def track_local @track_local end |
#track_params ⇒ Object
Returns the value of attribute track_params.
3 4 5 |
# File 'lib/configuration.rb', line 3 def track_params @track_params end |
#use_cookies ⇒ Object
Returns the value of attribute use_cookies.
3 4 5 |
# File 'lib/configuration.rb', line 3 def @use_cookies end |
Instance Method Details
#config_options ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/configuration.rb', line 19 def @configurations = [set_track_local, set_anonymize_ip, , , set_referrer, set_track_hash, set_track_params] @display_config = [] @configurations.each do |config| @display_config << config if config end @display_config.join(" ") end |
#set_anonymize_ip ⇒ Object
33 34 35 |
# File 'lib/configuration.rb', line 33 def set_anonymize_ip "_gs('set', 'anonymizeIP', true);" if @anonymize_ip == true end |
#set_cookie_domain ⇒ Object
37 38 39 |
# File 'lib/configuration.rb', line 37 def "_gs('set', 'cookieDomain', '#{@cookie_domain}');" if @cookie_domain end |
#set_referrer ⇒ Object
45 46 47 |
# File 'lib/configuration.rb', line 45 def set_referrer "_gs('set', 'referrer', '#{@referrer}');" if @referrer end |
#set_track_hash ⇒ Object
49 50 51 |
# File 'lib/configuration.rb', line 49 def set_track_hash "_gs('set', 'trackHash', true);" if @track_hash == true end |
#set_track_local ⇒ Object
29 30 31 |
# File 'lib/configuration.rb', line 29 def set_track_local "_gs('set', 'trackLocal', true);" if track_local == true end |
#set_track_params ⇒ Object
53 54 55 |
# File 'lib/configuration.rb', line 53 def set_track_params "_gs('set', 'trackParams', false);" if @track_params == false end |
#set_use_cookies ⇒ Object
41 42 43 |
# File 'lib/configuration.rb', line 41 def "_gs('set', 'useCookies', false);" if @use_cookies == false end |