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.
449 450 451 452 |
# File 'lib/knj/process.rb', line 449 def initialize(args) @args = args @answered = false end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
447 448 449 |
# File 'lib/knj/process.rb', line 447 def args @args end |
Instance Method Details
#answer(obj) ⇒ Object
Answers the call with the given object.
470 471 472 473 |
# File 'lib/knj/process.rb', line 470 def answer(obj) @answered = true @args[:process].answer(@args[:id], obj) end |
#answered? ⇒ Boolean
Returns true if this result has been answered.
476 477 478 |
# File 'lib/knj/process.rb', line 476 def answered? return @answered end |
#id ⇒ Object
Returns the ID this result-object should answer to.
465 466 467 |
# File 'lib/knj/process.rb', line 465 def id return @args[:id] end |
#obj ⇒ Object
The object that was passed to the current process/socket.
455 456 457 |
# File 'lib/knj/process.rb', line 455 def obj return @args[:obj] end |
#process ⇒ Object
Returns the process that spawned this resultobject.
460 461 462 |
# File 'lib/knj/process.rb', line 460 def process return @args[:process] end |