Class: QueueLite::Enqueue
- Inherits:
-
Module
- Object
- Module
- QueueLite::Enqueue
- Defined in:
- lib/queue_lite/enqueue.rb
Instance Method Summary collapse
-
#initialize(queue) ⇒ Enqueue
constructor
A new instance of Enqueue.
Constructor Details
#initialize(queue) ⇒ Enqueue
Returns a new instance of Enqueue.
7 8 9 10 11 12 |
# File 'lib/queue_lite/enqueue.rb', line 7 def initialize(queue) define_method :enqueue do |*args| queue.put(JSON.generate([self.class.to_s, *args])) true end end |