Class: Kameleoon::Browser

Inherits:
Data
  • Object
show all
Defined in:
lib/kameleoon/data.rb

Instance Attribute Summary collapse

Attributes inherited from Data

#instance, #sent

Instance Method Summary collapse

Constructor Details

#initialize(browser_type) ⇒ Browser

Returns a new instance of Browser.

Parameters:

  • browser_type (BrowserType)

    Browser type, can be: CHROME, INTERNET_EXPLORER, FIREFOX, SAFARI, OPERA, OTHER



74
75
76
77
78
# File 'lib/kameleoon/data.rb', line 74

def initialize(browser_type)
  @instance = DataType::BROWSER
  @sent = false
  @browser = browser_type
end

Instance Attribute Details

#browserObject

Returns the value of attribute browser.



71
72
73
# File 'lib/kameleoon/data.rb', line 71

def browser
  @browser
end

Instance Method Details

#obtain_full_post_text_lineObject



80
81
82
83
# File 'lib/kameleoon/data.rb', line 80

def obtain_full_post_text_line
  nonce = Kameleoon::Utils.generate_random_string(NONCE_LENGTH)
  "eventType=staticData&browser=" + @browser.to_s + "&nonce=" + nonce
end