Class: Knj::Process::Resultobject
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
-
#answer(obj) ⇒ Object
Answers the call with the given object.
-
#answered? ⇒ Boolean
Returns true if this result has been answered.
-
#id ⇒ Object
Returns the ID this result-object should answer to.
-
#initialize(args) ⇒ Resultobject
constructor
A new instance of Resultobject.
-
#obj ⇒ Object
The object that was passed to the current process/socket.
-
#process ⇒ Object
Returns the process that spawned this resultobject.
Constructor Details
#initialize(args) ⇒ Resultobject
Returns a new instance of Resultobject.
450 451 452 453 |
# File 'lib/knj/process.rb', line 450 def initialize(args) @args = args @answered = false end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
448 449 450 |
# File 'lib/knj/process.rb', line 448 def args @args end |
Instance Method Details
#answer(obj) ⇒ Object
Answers the call with the given object.
471 472 473 474 |
# File 'lib/knj/process.rb', line 471 def answer(obj) @answered = true @args[:process].answer(@args[:id], obj) end |
#answered? ⇒ Boolean
Returns true if this result has been answered.
477 478 479 |
# File 'lib/knj/process.rb', line 477 def answered? return @answered end |
#id ⇒ Object
Returns the ID this result-object should answer to.
466 467 468 |
# File 'lib/knj/process.rb', line 466 def id return @args[:id] end |
#obj ⇒ Object
The object that was passed to the current process/socket.
456 457 458 |
# File 'lib/knj/process.rb', line 456 def obj return @args[:obj] end |
#process ⇒ Object
Returns the process that spawned this resultobject.
461 462 463 |
# File 'lib/knj/process.rb', line 461 def process return @args[:process] end |