Class: CleoQualityReview::LlmProviders::Stub::Config
- Inherits:
-
Object
- Object
- CleoQualityReview::LlmProviders::Stub::Config
- Defined in:
- lib/cleo_quality_review/llm_providers/stub.rb
Overview
Configuration for the stub LLM provider.
Constant Summary collapse
- DEFAULT_RESPONSE =
"This is a stub review response for testing."
Class Method Summary collapse
-
.reset! ⇒ void
Reset to default response.
-
.response ⇒ String, Proc
The configured response.
-
.response=(response) ⇒ void
Configure the response for all stub clients.
Instance Method Summary collapse
-
#configured? ⇒ Boolean
Always true for stub.
-
#initialize(env: ENV) ⇒ Config
constructor
A new instance of Config.
-
#response ⇒ String
The configured response.
Constructor Details
#initialize(env: ENV) ⇒ Config
Returns a new instance of Config.
38 39 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 38 def initialize(env: ENV) end |
Class Method Details
.reset! ⇒ void
This method returns an undefined value.
Reset to default response.
31 32 33 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 31 def reset! @response = nil end |
.response ⇒ String, Proc
Returns the configured response.
24 25 26 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 24 def response @response || DEFAULT_RESPONSE end |
.response=(response) ⇒ void
This method returns an undefined value.
Configure the response for all stub clients.
18 19 20 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 18 def response=(response) @response = response end |
Instance Method Details
#configured? ⇒ Boolean
Returns always true for stub.
49 50 51 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 49 def configured? true end |
#response ⇒ String
Returns the configured response.
43 44 45 |
# File 'lib/cleo_quality_review/llm_providers/stub.rb', line 43 def response self.class.response end |