Can anyone please tell me why the new operator (klass.new) here is
used on what looks like a private method?
# Create a new instance of a browser driver, as determined by the
# configuration settings. (Don't be fooled: this is not actually
# an instance of Browser class.)
def new
set_sub_options
klass.new
end
# Create a new instance as with #new and start the browser on the
# specified url.
def start url
set_sub_options
klass.start url
end
def klass
key = Watir.options[:browser]
eval @@browser_classes[key] # this triggers the autoload
end
private :klass
Thanks
Aidy