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