Class: Blender::Task::Serf
- Inherits:
-
Base
- Object
- Base
- Blender::Task::Serf
- Defined in:
- lib/blender/tasks/serf.rb
Defined Under Namespace
Classes: SerfQuery
Instance Method Summary collapse
- #command ⇒ Object
- #execute(&block) ⇒ Object
-
#initialize(name, metadata = {}) ⇒ Serf
constructor
A new instance of Serf.
- #no_ack(bool) ⇒ Object
- #payload(pl) ⇒ Object
- #process(&block) ⇒ Object
- #query(q) ⇒ Object
- #timeout(t) ⇒ Object
Constructor Details
#initialize(name, metadata = {}) ⇒ Serf
Returns a new instance of Serf.
24 25 26 27 28 |
# File 'lib/blender/tasks/serf.rb', line 24 def initialize(name, = {}) super @command = SerfQuery.new @command.query= name end |
Instance Method Details
#command ⇒ Object
54 55 56 |
# File 'lib/blender/tasks/serf.rb', line 54 def command @command end |
#execute(&block) ⇒ Object
50 51 52 |
# File 'lib/blender/tasks/serf.rb', line 50 def execute(&block) @command.instance_eval(&block) end |
#no_ack(bool) ⇒ Object
42 43 44 |
# File 'lib/blender/tasks/serf.rb', line 42 def no_ack(bool) @command.noack = bool end |
#payload(pl) ⇒ Object
38 39 40 |
# File 'lib/blender/tasks/serf.rb', line 38 def payload(pl) @command.payload = pl end |
#process(&block) ⇒ Object
46 47 48 |
# File 'lib/blender/tasks/serf.rb', line 46 def process(&block) @command.process = block if block end |
#query(q) ⇒ Object
30 31 32 |
# File 'lib/blender/tasks/serf.rb', line 30 def query(q) @command.query = q end |
#timeout(t) ⇒ Object
34 35 36 |
# File 'lib/blender/tasks/serf.rb', line 34 def timeout(t) @command.timeout = t end |