[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

passing to with drb

Larz

1/8/2009 3:26:00 PM

I've been finding it easiest to pass hashes and arrays to DRb
processes because of what it can marshal. It would be nice if I could
pass a Struct or something as hash notation is extra verbose and I'd
like to be able to use the 'dot' notation. I guess I'd have to use
some sort of hash to Struct conversion after recieving the hash,
anyone else thought about that type of thing ?
1 Answer

Brian Candler

1/8/2009 10:07:00 PM

0

Larz wrote:
> I've been finding it easiest to pass hashes and arrays to DRb
> processes because of what it can marshal. It would be nice if I could
> pass a Struct or something as hash notation is extra verbose and I'd
> like to be able to use the 'dot' notation. I guess I'd have to use
> some sort of hash to Struct conversion after recieving the hash,
> anyone else thought about that type of thing ?

No need, you can pass your native struct (or any other Ruby class).
However both client and server processes need the class definition. If
you stick this in a file which they both require, then the job is done.
--
Posted via http://www.ruby-....