Class: OFlow::Task::Request
- Inherits:
-
Object
- Object
- OFlow::Task::Request
- Defined in:
- lib/oflow/task.rb
Overview
Internal class used to store information about asynchronous method invocations.
Instance Attribute Summary collapse
-
#box ⇒ Object
Returns the value of attribute box.
-
#op ⇒ Object
Returns the value of attribute op.
Instance Method Summary collapse
- #describe(detail = 3) ⇒ Object
-
#initialize(op, box) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(op, box) ⇒ Request
Returns a new instance of Request.
388 389 390 391 |
# File 'lib/oflow/task.rb', line 388 def initialize(op, box) @op = op @box = box end |
Instance Attribute Details
#box ⇒ Object
Returns the value of attribute box.
386 387 388 |
# File 'lib/oflow/task.rb', line 386 def box @box end |
#op ⇒ Object
Returns the value of attribute op.
385 386 387 |
# File 'lib/oflow/task.rb', line 385 def op @op end |
Instance Method Details
#describe(detail = 3) ⇒ Object
393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/oflow/task.rb', line 393 def describe(detail=3) if @box.nil? "#{@op}()" elsif 2 >= detail @op elsif 3 >= detail || @box.tracker.nil? "#{@op}(#{@box.contents})" else "#{@op}(#{@box.contents}) #{@box.tracker}" end end |