Class: TestTrack::AssignmentEventJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- TestTrack::AssignmentEventJob
- Defined in:
- app/jobs/test_track/assignment_event_job.rb
Instance Attribute Summary collapse
-
#assignment ⇒ Object
readonly
Returns the value of attribute assignment.
-
#visitor_id ⇒ Object
readonly
Returns the value of attribute visitor_id.
Instance Method Summary collapse
Instance Attribute Details
#assignment ⇒ Object (readonly)
Returns the value of attribute assignment.
3 4 5 |
# File 'app/jobs/test_track/assignment_event_job.rb', line 3 def assignment @assignment end |
#visitor_id ⇒ Object (readonly)
Returns the value of attribute visitor_id.
3 4 5 |
# File 'app/jobs/test_track/assignment_event_job.rb', line 3 def visitor_id @visitor_id end |
Instance Method Details
#perform(visitor_id:, split_name:, variant:, context:) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/jobs/test_track/assignment_event_job.rb', line 5 def perform(visitor_id:, split_name:, variant:, context:) raise "visitor_id must be present" if visitor_id.blank? raise "split_name must be present" if visitor_id.blank? @visitor_id = visitor_id @assignment = build_assignment(visitor_id, split_name, variant, context) create_assignment_event! end |