Class: Kameleoon::Browser
- Inherits:
-
DuplicationUnsafeData
- Object
- Data
- DuplicationUnsafeData
- Kameleoon::Browser
- Defined in:
- lib/kameleoon/data/browser.rb
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
#initialize(browser_type, version = Float::NAN) ⇒ Browser
Returns a new instance of Browser.
42 43 44 45 46 |
# File 'lib/kameleoon/data/browser.rb', line 42 def initialize(browser_type, version = Float::NAN) super(DataType::BROWSER) @type = browser_type @version = version end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
38 39 40 |
# File 'lib/kameleoon/data/browser.rb', line 38 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
38 39 40 |
# File 'lib/kameleoon/data/browser.rb', line 38 def version @version end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/kameleoon/data/browser.rb', line 48 def obtain_full_post_text_line params = { eventType: 'staticData', browserIndex: @type, nonce: nonce } params[:browserVersion] = @version if @version.is_a?(Integer) || (@version.is_a?(Float) && !@version.nan?) Kameleoon::Network::UriHelper.encode_query(params) end |