Hoping someone could tell me the answer to the following.
I have a class defined in a file: TestWebsite. The main program
requires the ‘net/http’ library and also the TestWebsite file. The
class “TestWebsite” contains several class methods that use things
such as “Net::HTTP.get_response()” however I get the following errors:
get_response': undefined methodrequest_uri’
for #<URI::Generic:0x2d3b9c URL:example.com> (NoMethodError)
start' from /opt/local/lib/ruby/1.8/net/http.rb:379:inget_response’
from ./test_website.rb:10:in `test’
It’s my guess the the class methods aren’t able to access the net/
http library which is in the kernel namespace, if this is true then
what must I do to allow them access?