Class: Qup::Producer
- Inherits:
-
Object
- Object
- Qup::Producer
- Defined in:
- lib/qup/producer.rb
Overview
Public: Produces items for a queue
Examples:
producer = queue.producer
producer.produce( )
Instance Method Summary collapse
-
#initialize(queue) ⇒ Producer
constructor
Public: Create a new Producer.
-
#produce(message) ⇒ Object
Public: Produce a message for the queue.
Constructor Details
#initialize(queue) ⇒ Producer
Public: Create a new Producer
queue - the Queue this producer is for
Returns a new Producer
15 16 17 |
# File 'lib/qup/producer.rb', line 15 def initialize( queue ) @queue = queue end |
Instance Method Details
#produce(message) ⇒ Object
Public: Produce a message for the queue
message - the Object to put onto the queue
Returns nothing.
24 25 26 |
# File 'lib/qup/producer.rb', line 24 def produce( ) @queue.produce( ) end |