一个基本问题 - 如何访问模块内的函数,然后是另一个模块,然后是一个类。
在宝石中 -
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
在我的文件中,我正在尝试这个 -
Handsoap:Http::Request.set_trust_ca_file('/etc/ssl/certs/ca-certificates.crt')
:Http is not a class/module (TypeError)