Class: AppStoreConnect::Client
- Inherits:
-
Object
- Object
- AppStoreConnect::Client
- Defined in:
- lib/app_store_connect/client.rb,
lib/app_store_connect/client/usage.rb,
lib/app_store_connect/client/utils.rb,
lib/app_store_connect/client/options.rb,
lib/app_store_connect/client/registry.rb,
lib/app_store_connect/client/authorization.rb
Defined Under Namespace
Classes: Authorization, Options, Registry, Usage, Utils
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Client
constructor
A new instance of Client.
-
#inspect ⇒ Object
:nocov:.
- #method_missing(method_name, *kwargs) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
-
#web_service_endpoint_aliases ⇒ Object
:nocov:.
Constructor Details
#initialize(**kwargs) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 |
# File 'lib/app_store_connect/client.rb', line 15 def initialize(**kwargs) @options = Options.new(kwargs) @usage = Usage.new(@options.slice(*Usage::OPTIONS)) @authorization = Authorization.new(@options.slice(*Authorization::OPTIONS)) @registry = Registry.new(@options.slice(*Registry::OPTIONS)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *kwargs) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/app_store_connect/client.rb', line 26 def method_missing(method_name, *kwargs) super unless web_service_endpoint_aliases.include?(method_name) web_service_endpoint = web_service_endpoint_by(method_name) call(web_service_endpoint, *kwargs) end |
Instance Method Details
#inspect ⇒ Object
:nocov:
35 36 37 |
# File 'lib/app_store_connect/client.rb', line 35 def inspect "#<#{self.class.name}:#{object_id}>" end |
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
22 23 24 |
# File 'lib/app_store_connect/client.rb', line 22 def respond_to_missing?(method_name, include_private = false) web_service_endpoint_aliases.include?(method_name) || super end |
#web_service_endpoint_aliases ⇒ Object
:nocov:
40 41 42 |
# File 'lib/app_store_connect/client.rb', line 40 def web_service_endpoint_aliases @registry.keys end |