A
aidy
I have two ruby files.
In the client file, I can do this:
require 'browser'
start_browser("http://gbahevm07l15:9081/wps/portal")
In the browser file I have this method
def start_browser (url)
......
@ie.goto(url)
......
end
However if I envelop this method within a user defined class
class Browser
def start_browser (url)
......
end
end
And in the client file, do this:
require 'browser'
Browser.new.start_browser("http://gbahevm07l15:9081/wps/portal")
I receive this error
'undefined method `start_browser' for main:Object (NoMethodError)'
and do not know why.
Could anyone help
Thanks
Aidy
In the client file, I can do this:
require 'browser'
start_browser("http://gbahevm07l15:9081/wps/portal")
In the browser file I have this method
def start_browser (url)
......
@ie.goto(url)
......
end
However if I envelop this method within a user defined class
class Browser
def start_browser (url)
......
end
end
And in the client file, do this:
require 'browser'
Browser.new.start_browser("http://gbahevm07l15:9081/wps/portal")
I receive this error
'undefined method `start_browser' for main:Object (NoMethodError)'
and do not know why.
Could anyone help
Thanks
Aidy