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.
382 383 384 385 |
# File 'lib/oflow/task.rb', line 382 def initialize(op, box) @op = op @box = box end |
Instance Attribute Details
#box ⇒ Object
Returns the value of attribute box.
380 381 382 |
# File 'lib/oflow/task.rb', line 380 def box @box end |
#op ⇒ Object
Returns the value of attribute op.
379 380 381 |
# File 'lib/oflow/task.rb', line 379 def op @op end |
Instance Method Details
#describe(detail = 3) ⇒ Object
387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/oflow/task.rb', line 387 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 |