Class: Kameleoon::OperatingSystem
- Inherits:
-
DuplicationUnsafeData
- Object
- Data
- DuplicationUnsafeData
- Kameleoon::OperatingSystem
- Defined in:
- lib/kameleoon/data/operating_system.rb
Overview
OperatingSystem contains information about the operating system on the visitor’s device
Instance Attribute Summary collapse
-
#os_type ⇒ Object
readonly
Returns the value of attribute os_type.
Attributes inherited from Data
Instance Method Summary collapse
-
#initialize(os_type) ⇒ OperatingSystem
constructor
A new instance of OperatingSystem.
- #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
#initialize(os_type) ⇒ OperatingSystem
Returns a new instance of OperatingSystem.
60 61 62 63 |
# File 'lib/kameleoon/data/operating_system.rb', line 60 def initialize(os_type) super(DataType::OPERATING_SYSTEM) @os_type = os_type end |
Instance Attribute Details
#os_type ⇒ Object (readonly)
Returns the value of attribute os_type.
53 54 55 |
# File 'lib/kameleoon/data/operating_system.rb', line 53 def os_type @os_type end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/kameleoon/data/operating_system.rb', line 65 def obtain_full_post_text_line params = { eventType: 'staticData', os: OperatingSystemType.name_from_type(@os_type), osIndex: @os_type, nonce: nonce } Kameleoon::Network::UriHelper.encode_query(params) end |
#to_s ⇒ Object
55 56 57 |
# File 'lib/kameleoon/data/operating_system.rb', line 55 def to_s "OperatingSystem{os_type:#{@os_type}}" end |