Class: GeminiApi::Client
- Inherits:
-
Object
- Object
- GeminiApi::Client
- Defined in:
- lib/gemini_api/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config: GeminiApi.config) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Class Method Details
.endpoint(name) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/gemini_api/client.rb', line 14 def self.endpoint(name) define_method(name) do |**args| klass_name = Hanami::Utils::String.classify(name) endpoint_klass = Hanami::Utils::Class.load!("GeminiApi::Endpoints::#{klass_name}") endpoint_klass.(config, **args) end end |