Module: Protege::ProviderMixin::ClassMethods

Defined in:
lib/protege/extensions/provider_mixin.rb

Overview

Class-level DSL provided by the mixin. The provider's id (and the rest of its manifest metadata) comes from the shared Extensions::Manifested concern; protege_id is the provider-facing name for its explicit-id override, kept because a provider's id must match config.provider_id exactly rather than be derived from the class name.

Instance Method Summary collapse

Instance Method Details

#protege_id(symbol) ⇒ Symbol

Declare the symbolic identifier this provider responds to — an explicit override of the name-derived manifest id. Call inside the class body; the configured provider_id references the provider by this symbol.

Parameters:

  • symbol (Symbol)

    the provider's unique identifier (e.g. :openrouter).

Returns:

  • (Symbol)

    the stored identifier.



111
112
113
# File 'lib/protege/extensions/provider_mixin.rb', line 111

def protege_id(symbol)
  manifest_id(symbol)
end