Class: VibeSort::Configuration
- Inherits:
-
Object
- Object
- VibeSort::Configuration
- Defined in:
- lib/vibe_sort/configuration.rb
Overview
Configuration class for VibeSort Holds API key and temperature settings
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
Instance Method Summary collapse
-
#initialize(api_key:, temperature: 0.0) ⇒ Configuration
constructor
Initialize a new Configuration.
Constructor Details
#initialize(api_key:, temperature: 0.0) ⇒ Configuration
Initialize a new Configuration
14 15 16 17 18 19 |
# File 'lib/vibe_sort/configuration.rb', line 14 def initialize(api_key:, temperature: 0.0) raise ArgumentError, "API key cannot be nil or empty" if api_key.nil? || api_key.empty? @api_key = api_key @temperature = temperature end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/vibe_sort/configuration.rb', line 7 def api_key @api_key end |
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature.
7 8 9 |
# File 'lib/vibe_sort/configuration.rb', line 7 def temperature @temperature end |