Class: Honeybadger::Agent::Worker::Queue
- Inherits:
-
Queue
- Object
- Queue
- Honeybadger::Agent::Worker::Queue
- Defined in:
- lib/honeybadger/agent/worker.rb
Overview
Internal: A queue which enforces a maximum size.
Instance Attribute Summary collapse
-
#max_size ⇒ Object
readonly
Returns the value of attribute max_size.
Instance Method Summary collapse
-
#initialize(max_size) ⇒ Queue
constructor
A new instance of Queue.
- #push(obj) ⇒ Object
Constructor Details
#initialize(max_size) ⇒ Queue
Returns a new instance of Queue.
22 23 24 25 |
# File 'lib/honeybadger/agent/worker.rb', line 22 def initialize(max_size) @max_size = max_size super() end |
Instance Attribute Details
#max_size ⇒ Object (readonly)
Returns the value of attribute max_size.
20 21 22 |
# File 'lib/honeybadger/agent/worker.rb', line 20 def max_size @max_size end |
Instance Method Details
#push(obj) ⇒ Object
27 28 29 |
# File 'lib/honeybadger/agent/worker.rb', line 27 def push(obj) super unless size == max_size end |