Class: Pione::DRbPatch::ClientRequest
- Inherits:
-
Object
- Object
- Pione::DRbPatch::ClientRequest
- Defined in:
- lib/pione/patch/drb-patch.rb
Overview
ClientRequest represents client's requests.
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#msg_id ⇒ Object
readonly
Returns the value of attribute msg_id.
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
-
#req_id ⇒ Object
readonly
Returns the value of attribute req_id.
Class Method Summary collapse
Instance Method Summary collapse
- #eval ⇒ Object
-
#initialize(req_id, obj, msg_id, argv, block, available) ⇒ ClientRequest
constructor
A new instance of ClientRequest.
Constructor Details
#initialize(req_id, obj, msg_id, argv, block, available) ⇒ ClientRequest
Returns a new instance of ClientRequest.
311 312 313 314 315 316 317 318 |
# File 'lib/pione/patch/drb-patch.rb', line 311 def initialize(req_id, obj, msg_id, argv, block, available) @req_id = req_id @obj = obj @msg_id = msg_id.intern @argv = argv @block = block @available = available end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
307 308 309 |
# File 'lib/pione/patch/drb-patch.rb', line 307 def argv @argv end |
#available ⇒ Object (readonly)
Returns the value of attribute available.
309 310 311 |
# File 'lib/pione/patch/drb-patch.rb', line 309 def available @available end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
308 309 310 |
# File 'lib/pione/patch/drb-patch.rb', line 308 def block @block end |
#msg_id ⇒ Object (readonly)
Returns the value of attribute msg_id.
306 307 308 |
# File 'lib/pione/patch/drb-patch.rb', line 306 def msg_id @msg_id end |
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
305 306 307 |
# File 'lib/pione/patch/drb-patch.rb', line 305 def obj @obj end |
#req_id ⇒ Object (readonly)
Returns the value of attribute req_id.
304 305 306 |
# File 'lib/pione/patch/drb-patch.rb', line 304 def req_id @req_id end |
Class Method Details
.receive(client) ⇒ Object
300 301 302 |
# File 'lib/pione/patch/drb-patch.rb', line 300 def self.receive(client) self.new(*client.recv_request) end |
Instance Method Details
#eval ⇒ Object
320 321 322 323 324 325 326 |
# File 'lib/pione/patch/drb-patch.rb', line 320 def eval if @available @block ? eval_with_block : eval_without_block else raise BadRequestError end end |