A
aidy
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")
Thanks
Aidy
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")
Thanks
Aidy