From: Mayank Kohaley Date: 2011-03-20T03:10:52+09:00 Subject: Re: accessing object contents --0016e644ce987873f6049ed9d09b Content-Type: text/plain; charset=ISO-8859-1 On Sat, Mar 19, 2011 at 11:22 PM, John Doe wrote: > given > => # > > what's the proper way of getting to "www.nbc.com."? is it > with the to_s method? > > obj.to_s > > -- > Posted via http://www.ruby-forum.com/. > > Override the to_s method in your class and define it to print out the value of variable. Then you can call to_s method on the object. -- Mayank Kohaley --0016e644ce987873f6049ed9d09b--