Class: SidekiqUniqueJobs::Lock::LockInfoStub
- Inherits:
-
Object
- Object
- SidekiqUniqueJobs::Lock::LockInfoStub
- Defined in:
- lib/sidekiq_unique_jobs/lock.rb
Overview
Minimal struct to provide .value and hash-like access for web UI compat
Instance Method Summary collapse
- #[](key) ⇒ Object
- #any? ⇒ Boolean
-
#initialize(hash = {}) ⇒ LockInfoStub
constructor
A new instance of LockInfoStub.
- #none? ⇒ Boolean
- #value ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ LockInfoStub
Returns a new instance of LockInfoStub.
171 172 173 |
# File 'lib/sidekiq_unique_jobs/lock.rb', line 171 def initialize(hash = {}) @hash = hash end |
Instance Method Details
#[](key) ⇒ Object
179 180 181 |
# File 'lib/sidekiq_unique_jobs/lock.rb', line 179 def [](key) @hash[key] end |
#any? ⇒ Boolean
187 188 189 |
# File 'lib/sidekiq_unique_jobs/lock.rb', line 187 def any? !none? end |
#none? ⇒ Boolean
183 184 185 |
# File 'lib/sidekiq_unique_jobs/lock.rb', line 183 def none? @hash.empty? end |
#value ⇒ Object
175 176 177 |
# File 'lib/sidekiq_unique_jobs/lock.rb', line 175 def value @hash end |