Class: AnzApi::Client
- Inherits:
-
Object
- Object
- AnzApi::Client
- Defined in:
- lib/anz_api/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config: AnzApi.config) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Class Method Details
.endpoint(name) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/anz_api/client.rb', line 5 def self.endpoint(name) define_method(name) do |**args| klass_name = Hanami::Utils::String.classify(name) endpoint_klass = Hanami::Utils::Class.load!("AnzApi::Endpoints::#{klass_name}") endpoint_klass.(config, **args) end end |