Class: CodexSDK::Options

Inherits:
Data
  • Object
show all
Defined in:
lib/codex_sdk/options.rb

Overview

Constructor options for CodexSDK::Client.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(codex_path: nil, base_url: nil, api_key: nil, config: {}, env: nil) ⇒ Options

Returns a new instance of Options.



12
13
14
# File 'lib/codex_sdk/options.rb', line 12

def initialize(codex_path: nil, base_url: nil, api_key: nil, config: {}, env: nil)
  super
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key

Returns:

  • (Object)

    the current value of api_key



5
6
7
# File 'lib/codex_sdk/options.rb', line 5

def api_key
  @api_key
end

#base_urlObject (readonly)

Returns the value of attribute base_url

Returns:

  • (Object)

    the current value of base_url



5
6
7
# File 'lib/codex_sdk/options.rb', line 5

def base_url
  @base_url
end

#codex_pathObject (readonly)

Returns the value of attribute codex_path

Returns:

  • (Object)

    the current value of codex_path



5
6
7
# File 'lib/codex_sdk/options.rb', line 5

def codex_path
  @codex_path
end

#configObject (readonly)

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



5
6
7
# File 'lib/codex_sdk/options.rb', line 5

def config
  @config
end

#envObject (readonly)

Returns the value of attribute env

Returns:

  • (Object)

    the current value of env



5
6
7
# File 'lib/codex_sdk/options.rb', line 5

def env
  @env
end

Instance Method Details

#inspectObject



16
17
18
19
20
# File 'lib/codex_sdk/options.rb', line 16

def inspect
  redacted_key = api_key ? "[REDACTED]" : "nil"
  "#<#{self.class} codex_path=#{codex_path.inspect} base_url=#{base_url.inspect} " \
    "api_key=#{redacted_key} config=#{config.inspect} env=#{env ? "[SET]" : "nil"}>"
end