Class: SuperPoller::StarlingQueue
- Inherits:
-
Object
- Object
- SuperPoller::StarlingQueue
- Defined in:
- lib/super_poller/starling_queue.rb
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(queue_name, *args) ⇒ StarlingQueue
constructor
A new instance of StarlingQueue.
- #pop ⇒ Object
- #push(v) ⇒ Object
Constructor Details
#initialize(queue_name, *args) ⇒ StarlingQueue
Returns a new instance of StarlingQueue.
4 5 6 7 |
# File 'lib/super_poller/starling_queue.rb', line 4 def initialize(queue_name, *args) @queue_name = queue_name.to_s @queue = Starling.new(*args) end |
Instance Method Details
#fetch ⇒ Object
17 18 19 |
# File 'lib/super_poller/starling_queue.rb', line 17 def fetch @queue.fetch(@queue_name) end |
#pop ⇒ Object
9 10 11 |
# File 'lib/super_poller/starling_queue.rb', line 9 def pop @queue.get(@queue_name) end |
#push(v) ⇒ Object
13 14 15 |
# File 'lib/super_poller/starling_queue.rb', line 13 def push(v) @queue.set(@queue_name, v) end |