Class: Optimizely::VisitorAttribute
- Inherits:
-
Object
- Object
- Optimizely::VisitorAttribute
- Defined in:
- lib/optimizely/event/entity/visitor_attribute.rb
Instance Attribute Summary collapse
-
#entity_id ⇒ Object
readonly
Returns the value of attribute entity_id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(entity_id:, key:, type:, value:) ⇒ VisitorAttribute
constructor
A new instance of VisitorAttribute.
Constructor Details
#initialize(entity_id:, key:, type:, value:) ⇒ VisitorAttribute
Returns a new instance of VisitorAttribute.
22 23 24 25 26 27 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 22 def initialize(entity_id:, key:, type:, value:) @entity_id = entity_id @key = key @type = type @value = value end |
Instance Attribute Details
#entity_id ⇒ Object (readonly)
Returns the value of attribute entity_id.
20 21 22 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 20 def entity_id @entity_id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
20 21 22 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 20 def key @key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
20 21 22 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 20 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
20 21 22 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 20 def value @value end |
Instance Method Details
#as_json ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/optimizely/event/entity/visitor_attribute.rb', line 29 def as_json { entity_id: @entity_id, key: @key, type: @type, value: @value } end |