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.
513 514 515 516 |
# File 'lib/oflow/task.rb', line 513 def initialize(op, box) @op = op @box = box end |
Instance Attribute Details
#box ⇒ Object
Returns the value of attribute box.
511 512 513 |
# File 'lib/oflow/task.rb', line 511 def box @box end |
#op ⇒ Object
Returns the value of attribute op.
510 511 512 |
# File 'lib/oflow/task.rb', line 510 def op @op end |
Instance Method Details
#describe(detail = 3) ⇒ Object
518 519 520 521 522 523 524 525 526 527 528 |
# File 'lib/oflow/task.rb', line 518 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 |