Method: Ncio::Api::V1#connection
- Defined in:
- lib/ncio/api/v1.rb
#connection ⇒ Object
Return a memoized HTTP connection
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ncio/api/v1.rb', line 46 def connection return @connection if @connection conn_opts = { host: host, port: port, cert: opts[:cert], key: opts[:key], cacert: opts[:cacert] } @connection = Ncio::HttpClient.new(conn_opts) end |