Class: TestTrack::Fake::Visitor
- Inherits:
-
Object
- Object
- TestTrack::Fake::Visitor
- Defined in:
- app/models/test_track/fake/visitor.rb
Defined Under Namespace
Classes: Assignment
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #assignments ⇒ Object
-
#initialize(id) ⇒ Visitor
constructor
A new instance of Visitor.
- #split_registry ⇒ Object
Constructor Details
#initialize(id) ⇒ Visitor
Returns a new instance of Visitor.
15 16 17 |
# File 'app/models/test_track/fake/visitor.rb', line 15 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'app/models/test_track/fake/visitor.rb', line 2 def id @id end |
Class Method Details
.instance ⇒ Object
6 7 8 |
# File 'app/models/test_track/fake/visitor.rb', line 6 def self.instance @instance ||= new(TestTrack::FakeServer.seed) end |
.reset! ⇒ Object
10 11 12 13 |
# File 'app/models/test_track/fake/visitor.rb', line 10 def self.reset! @instance = nil TestTrack::Fake::SplitRegistry.reset! end |
Instance Method Details
#assignments ⇒ Object
19 20 21 |
# File 'app/models/test_track/fake/visitor.rb', line 19 def assignments @assignments ||= _assignments end |
#split_registry ⇒ Object
23 24 25 |
# File 'app/models/test_track/fake/visitor.rb', line 23 def split_registry TestTrack::SplitRegistry.new(TestTrack::Fake::SplitRegistry.instance.to_h) end |