A basic question – How do I access a function inside a module, then another module, then a class.
In a gem –
module Handsoap
module Http
# Represents a HTTP Request.
class Request
attr_reader :url, :http_method, :headers, :body, :username, :password, :trust_ca_file, :client_cert_file, :client_cert_key_file
attr_writer :body, :http_method
def set_trust_ca_file(ca_file)
@trust_ca_file = ca_file
end
end
end
end
In my file, I am trying this –
Handsoap:Http::Request.set_trust_ca_file('/etc/ssl/certs/ca-certificates.crt')
:Http is not a class/module (TypeError)
You have a typo. Should be
Also, your method should be class instance method