Class: IBM::CloudSDK
- Inherits:
-
Object
- Object
- IBM::CloudSDK
- Defined in:
- lib/ibm/cloud/sdk/vpc/cloud_sdk.rb
Overview
Holds the SDK pieces.
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #http_options(options = {}) ⇒ Object
-
#initialize(api_key, logger: nil, options: {}) ⇒ CloudSDK
constructor
A new instance of CloudSDK.
- #vpc(region = 'us-east') ⇒ Object
Constructor Details
#initialize(api_key, logger: nil, options: {}) ⇒ CloudSDK
Returns a new instance of CloudSDK.
10 11 12 13 14 15 16 |
# File 'lib/ibm/cloud/sdk/vpc/cloud_sdk.rb', line 10 def initialize(api_key, logger: nil, options: {}) @logger = logger @logger ||= Logger.new($stdout, level: :warn) @client = HTTP.use(()) @connection = IBM::Cloud::SDK::VPC::Connection.new(api_key, logger: @logger, client: @client) end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
27 28 29 |
# File 'lib/ibm/cloud/sdk/vpc/cloud_sdk.rb', line 27 def connection @connection end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
27 28 29 |
# File 'lib/ibm/cloud/sdk/vpc/cloud_sdk.rb', line 27 def logger @logger end |
Instance Method Details
#http_options(options = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/ibm/cloud/sdk/vpc/cloud_sdk.rb', line 18 def ( = {}) .merge( { logging: { logger: @logger }, auto_deflate: {} } ) end |