Class: Yunhe::Producer
- Inherits:
-
Thread
- Object
- Thread
- Yunhe::Producer
- Defined in:
- lib/yunhe/producer.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#queue ⇒ Object
Returns the value of attribute queue.
Instance Method Summary collapse
-
#initialize(queue, block) ⇒ Producer
constructor
A new instance of Producer.
Constructor Details
#initialize(queue, block) ⇒ Producer
Returns a new instance of Producer.
6 7 8 9 10 |
# File 'lib/yunhe/producer.rb', line 6 def initialize(queue, block) super &(method(:job).to_proc) @block = block self.queue = queue end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
4 5 6 |
# File 'lib/yunhe/producer.rb', line 4 def block @block end |
#queue ⇒ Object
Returns the value of attribute queue.
3 4 5 |
# File 'lib/yunhe/producer.rb', line 3 def queue @queue end |