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