# DRb: nested remote objects?

**URL:** <https://www.ruby-forum.com/t/drb-nested-remote-objects/74920>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/drb-nested-remote-objects/74920 "2006-11-07T11:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/drb-nested-remote-objects/74920/1 "2006-11-07T11:01:53Z")

</div>

I have followed a couple of intros and played around without luck. Given

account = DRbObject.new(nil, ‘druby://localhost:9000’)

can I get into nested attributes and have them as remote objects?

puts account.company.address.city

Or in DRb you design a “procedural” API with all you need around a  
single remote object so to speak?

– fxn

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/drb-nested-remote-objects/74920/2 "2006-11-07T11:01:55Z")

</div>

On Nov 4, 2006, at 7:31 PM, Xavier N. wrote:

> I have followed a couple of intros and played around without luck.  
> Given
> 
> account = DRbObject.new(nil, ‘druby://localhost:9000’)
> 
> can I get into nested attributes and have them as remote objects?
> 
> puts account.company.address.city

Nevermind, I opened drb/drb.rb and saw the comments there. For the  
archives, the classes Company and Address suggested in the example  
above have to include the DRb::DRbUndumped mixin module.

– fxn
