Class: ElevenlabsClient::Settings
- Inherits:
-
Object
- Object
- ElevenlabsClient::Settings
- Defined in:
- lib/elevenlabs_client/settings.rb
Class Attribute Summary collapse
-
.properties ⇒ Object
Returns the value of attribute properties.
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .elevenlabs_api_key ⇒ Object
- .elevenlabs_base_uri ⇒ Object
-
.reset! ⇒ Object
Reset configuration (useful for testing).
Class Attribute Details
.properties ⇒ Object
Returns the value of attribute properties.
6 7 8 |
# File 'lib/elevenlabs_client/settings.rb', line 6 def properties @properties end |
Class Method Details
.configure {|_self| ... } ⇒ Object
8 9 10 11 |
# File 'lib/elevenlabs_client/settings.rb', line 8 def configure self.properties ||= {} yield(self) if block_given? end |
.elevenlabs_api_key ⇒ Object
17 18 19 |
# File 'lib/elevenlabs_client/settings.rb', line 17 def elevenlabs_api_key properties&.dig(:elevenlabs_api_key) || ENV["ELEVENLABS_API_KEY"] end |
.elevenlabs_base_uri ⇒ Object
13 14 15 |
# File 'lib/elevenlabs_client/settings.rb', line 13 def elevenlabs_base_uri properties&.dig(:elevenlabs_base_uri) || ENV["ELEVENLABS_BASE_URL"] || "https://api.elevenlabs.io" end |
.reset! ⇒ Object
Reset configuration (useful for testing)
22 23 24 |
# File 'lib/elevenlabs_client/settings.rb', line 22 def reset! self.properties = {} end |