Class: Asana::Client::ResourceProxy Private
- Inherits:
-
Object
- Object
- Asana::Client::ResourceProxy
- Defined in:
- lib/asana/client.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Proxies Resource classes to implement a fluent API on the Client instances.
Instance Method Summary collapse
-
#initialize(client: required('client'), resource: required('resource')) ⇒ ResourceProxy
constructor
private
A new instance of ResourceProxy.
- #method_missing(method_name, *args, **kwargs, &block) ⇒ Object private
- #respond_to_missing?(method_name) ⇒ Boolean private
Constructor Details
#initialize(client: required('client'), resource: required('resource')) ⇒ ResourceProxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ResourceProxy.
59 60 61 62 |
# File 'lib/asana/client.rb', line 59 def initialize(client: required('client'), resource: required('resource')) @client = client @resource = resource end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, **kwargs, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
64 65 66 |
# File 'lib/asana/client.rb', line 64 def method_missing(method_name, *args, **kwargs, &block) @resource.public_send(method_name, *([@client] + args), **kwargs, &block) end |
Instance Method Details
#respond_to_missing?(method_name) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
68 69 70 |
# File 'lib/asana/client.rb', line 68 def respond_to_missing?(method_name, *) @resource.respond_to?(method_name) end |