From: Michael Guterl Date: 2008-08-11T03:28:58+09:00 Subject: Re: why does the initialize method not return the last expression? On Sun, Aug 10, 2008 at 2:07 PM, aidy wrote: > Hi, > > In Ruby the last expression in a method is returned. > > Why is this not the case for the initialize method? > > class Browser > > def initialize > ie ||= Watir::IE.new > end > > end > > ie = Browser.new > > #goto is a url navigation method in Watir > #but I can't do this > > ie.goto("www.gmail.com") > You have a few options. Depending on what you're really trying to do. Here is the simplest. Browser = Watir::IE ie = Browser.new ie.goto("www.gmail.com") Michael Guterl