Class: RubyLLM::SemanticCache::Scoped::ScopedConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/semantic_cache/scoped.rb

Overview

Wrapper that delegates to main config but overrides namespace

Instance Method Summary collapse

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

#namespaceObject



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

Returns:

  • (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