Class: Sidekiq::SortedSet
- Inherits:
-
Object
- Object
- Sidekiq::SortedSet
- Includes:
- Enumerable
- Defined in:
- lib/sidekiq/api.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #clear ⇒ Object (also: #💣)
-
#initialize(name) ⇒ SortedSet
constructor
A new instance of SortedSet.
- #size ⇒ Object
Constructor Details
#initialize(name) ⇒ SortedSet
Returns a new instance of SortedSet.
295 296 297 298 |
# File 'lib/sidekiq/api.rb', line 295 def initialize(name) @name = name @_size = size end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
293 294 295 |
# File 'lib/sidekiq/api.rb', line 293 def name @name end |
Instance Method Details
#clear ⇒ Object Also known as: 💣
304 305 306 307 308 |
# File 'lib/sidekiq/api.rb', line 304 def clear Sidekiq.redis do |conn| conn.del(name) end end |
#size ⇒ Object
300 301 302 |
# File 'lib/sidekiq/api.rb', line 300 def size Sidekiq.redis {|c| c.zcard(name) } end |