Class: CodexSDK::Options
- Inherits:
-
Data
- Object
- Data
- CodexSDK::Options
- Defined in:
- lib/codex_sdk/options.rb
Overview
Constructor options for CodexSDK::Client.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#codex_path ⇒ Object
readonly
Returns the value of attribute codex_path.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(codex_path: nil, base_url: nil, api_key: nil, config: {}, env: nil) ⇒ Options
constructor
A new instance of Options.
- #inspect ⇒ Object
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_key ⇒ Object (readonly)
Returns the value of attribute api_key
5 6 7 |
# File 'lib/codex_sdk/options.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url
5 6 7 |
# File 'lib/codex_sdk/options.rb', line 5 def base_url @base_url end |
#codex_path ⇒ Object (readonly)
Returns the value of attribute codex_path
5 6 7 |
# File 'lib/codex_sdk/options.rb', line 5 def codex_path @codex_path end |
#config ⇒ Object (readonly)
Returns the value of attribute config
5 6 7 |
# File 'lib/codex_sdk/options.rb', line 5 def config @config end |
#env ⇒ Object (readonly)
Returns the value of attribute env
5 6 7 |
# File 'lib/codex_sdk/options.rb', line 5 def env @env end |
Instance Method Details
#inspect ⇒ Object
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 |