Class: Tenable::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/tenable/connection.rb

Overview

Manages the Faraday HTTP connection with configured middleware.

Automatically configures authentication, retry, and logging middleware based on the provided Configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Connection

Creates a new connection from the given configuration.

Parameters:

Raises:

  • (ArgumentError)

    if the base_url does not use HTTPS



16
17
18
19
# File 'lib/tenable/connection.rb', line 16

def initialize(config)
  @config = config
  @faraday = build_connection
end

Instance Attribute Details

#faradayFaraday::Connection (readonly)

Returns the underlying Faraday connection.

Returns:

  • (Faraday::Connection)

    the underlying Faraday connection



10
11
12
# File 'lib/tenable/connection.rb', line 10

def faraday
  @faraday
end