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
- #to_s ⇒ Object
Methods inherited from Data
#mark_as_sent, #mark_as_transmitting, #mark_as_unsent, #sent, #transmitting, #unsent
Constructor Details
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
52 53 54 55 56 57 58 59 60 |
# File 'lib/kameleoon/data/browser.rb', line 52 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 |
#to_s ⇒ Object
40 41 42 |
# File 'lib/kameleoon/data/browser.rb', line 40 def to_s "Browser{type:#{@type},version:#{@version}}" end |