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) ⇒ void private
- #as_json ⇒ Object private
- #each(&blk) ⇒ 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) ⇒ void
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.
This method returns an undefined value.
16 17 18 19 20 21 22 |
# File 'lib/aikido/zen/collector/users.rb', line 16 def add(actor) if key?(actor.id) self[actor.id] |= actor 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.
28 29 30 |
# File 'lib/aikido/zen/collector/users.rb', line 28 def as_json map(&:as_json) end |
#each(&blk) ⇒ 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.
24 25 26 |
# File 'lib/aikido/zen/collector/users.rb', line 24 def each(&blk) each_value(&blk) end |