Class: Aikido::Zen::Collector::Users Private
- Inherits:
-
Aikido::Zen::CappedMap
- Object
- Aikido::Zen::CappedMap
- Aikido::Zen::Collector::Users
- Defined in:
- lib/aikido/zen/collector/users.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Keeps track of the users that were seen by the app.
Instance Attribute Summary
Attributes inherited from Aikido::Zen::CappedMap
Instance Method Summary collapse
- #add(actor) ⇒ Object private
- #as_json ⇒ Object private
- #each(&b) ⇒ Object private
-
#initialize(config = Aikido::Zen.config) ⇒ Users
constructor
private
A new instance of Users.
Methods inherited from Aikido::Zen::CappedMap
Constructor Details
#initialize(config = Aikido::Zen.config) ⇒ Users
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Users.
10 11 12 |
# File 'lib/aikido/zen/collector/users.rb', line 10 def initialize(config = Aikido::Zen.config) super(config.max_users_tracked) end |
Instance Method Details
#add(actor) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 |
# File 'lib/aikido/zen/collector/users.rb', line 14 def add(actor) if key?(actor.id) self[actor.id].update else self[actor.id] = actor end end |
#as_json ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/aikido/zen/collector/users.rb', line 26 def as_json map(&:as_json) end |
#each(&b) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/aikido/zen/collector/users.rb', line 22 def each(&b) each_value(&b) end |