Class: Kameleoon::Browser
Overview
Represents browser data for tracking calls
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Attributes inherited from Data
Instance Method Summary collapse
-
#initialize(browser_type, version = Float::NAN) ⇒ Browser
constructor
A new instance of Browser.
- #obtain_full_post_text_line ⇒ Object
Methods inherited from Data
Constructor Details
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/kameleoon/data/browser.rb', line 16 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
16 17 18 |
# File 'lib/kameleoon/data/browser.rb', line 16 def version @version end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
26 27 28 29 30 31 |
# File 'lib/kameleoon/data/browser.rb', line 26 def obtain_full_post_text_line nonce = Kameleoon::Utils.generate_random_string(NONCE_LENGTH) url = "eventType=staticData&browserIndex=#{@type}&nonce=#{nonce}" url.concat("&browserVersion=#{@version}") if @version.is_a?(Integer) || (@version.is_a?(Float) && !@version.nan?) url end |