Class: RubyLLM::SemanticCache::Scoped::ScopedConfig
- Inherits:
-
Object
- Object
- RubyLLM::SemanticCache::Scoped::ScopedConfig
- Defined in:
- lib/ruby_llm/semantic_cache/scoped.rb
Overview
Wrapper that delegates to main config but overrides namespace
Instance Method Summary collapse
-
#initialize(config, namespace) ⇒ ScopedConfig
constructor
A new instance of ScopedConfig.
- #method_missing(method, *args, &block) ⇒ Object
- #namespace ⇒ Object
- #respond_to_missing?(method, include_private = false) ⇒ Boolean
Constructor Details
#initialize(config, namespace) ⇒ ScopedConfig
Returns a new instance of ScopedConfig.
196 197 198 199 |
# File 'lib/ruby_llm/semantic_cache/scoped.rb', line 196 def initialize(config, namespace) @config = config @namespace = namespace end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
205 206 207 |
# File 'lib/ruby_llm/semantic_cache/scoped.rb', line 205 def method_missing(method, *args, &block) @config.send(method, *args, &block) end |
Instance Method Details
#namespace ⇒ Object
201 202 203 |
# File 'lib/ruby_llm/semantic_cache/scoped.rb', line 201 def namespace @namespace end |
#respond_to_missing?(method, include_private = false) ⇒ Boolean
209 210 211 |
# File 'lib/ruby_llm/semantic_cache/scoped.rb', line 209 def respond_to_missing?(method, include_private = false) @config.respond_to?(method, include_private) end |