Module: Distribot::Worker::ClassMethods
- Defined in:
- lib/distribot/worker.rb
Class Attribute Summary collapse
-
.enumerator ⇒ Object
Returns the value of attribute enumerator.
-
.process_tasks_with ⇒ Object
Returns the value of attribute process_tasks_with.
-
.processor ⇒ Object
Returns the value of attribute processor.
-
.version ⇒ Object
Returns the value of attribute version.
Instance Attribute Summary collapse
-
#enumerator ⇒ Object
readonly
Returns the value of attribute enumerator.
-
#processor ⇒ Object
readonly
Returns the value of attribute processor.
Instance Method Summary collapse
- #enumerate_with(callback) ⇒ Object
- #enumeration_queue ⇒ Object
- #process_tasks_with(callback) ⇒ Object
- #task_queue ⇒ Object
-
#version(val = nil) ⇒ Object
Does both setting/getting:.
Class Attribute Details
.enumerator ⇒ Object
Returns the value of attribute enumerator.
12 13 14 |
# File 'lib/distribot/worker.rb', line 12 def enumerator @enumerator end |
.process_tasks_with ⇒ Object
Returns the value of attribute process_tasks_with.
12 13 14 |
# File 'lib/distribot/worker.rb', line 12 def process_tasks_with @process_tasks_with end |
.processor ⇒ Object
Returns the value of attribute processor.
12 13 14 |
# File 'lib/distribot/worker.rb', line 12 def processor @processor end |
.version ⇒ Object
Returns the value of attribute version.
12 13 14 |
# File 'lib/distribot/worker.rb', line 12 def version @version end |
Instance Attribute Details
#enumerator ⇒ Object (readonly)
Returns the value of attribute enumerator.
15 16 17 |
# File 'lib/distribot/worker.rb', line 15 def enumerator @enumerator end |
#processor ⇒ Object (readonly)
Returns the value of attribute processor.
15 16 17 |
# File 'lib/distribot/worker.rb', line 15 def processor @processor end |
Instance Method Details
#enumerate_with(callback) ⇒ Object
17 18 19 |
# File 'lib/distribot/worker.rb', line 17 def enumerate_with(callback) @enumerator = callback end |
#enumeration_queue ⇒ Object
32 33 34 35 |
# File 'lib/distribot/worker.rb', line 32 def enumeration_queue self.version ||= '0.0.0' "distribot.flow.handler.#{self}.#{self.version}.enumerate" end |
#process_tasks_with(callback) ⇒ Object
21 22 23 |
# File 'lib/distribot/worker.rb', line 21 def process_tasks_with(callback) @processor = callback end |
#task_queue ⇒ Object
37 38 39 40 |
# File 'lib/distribot/worker.rb', line 37 def task_queue self.version ||= '0.0.0' "distribot.flow.handler.#{self}.#{self.version}.tasks" end |
#version(val = nil) ⇒ Object
Does both setting/getting:
26 27 28 29 30 |
# File 'lib/distribot/worker.rb', line 26 def version(val = nil) @version ||= '0.0.0' @version = val unless val.nil? @version end |