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(m, *args, **kwargs, &block) ⇒ Object private
- #respond_to_missing?(m) ⇒ 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.
57 58 59 60 |
# File 'lib/asana/client.rb', line 57 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(m, *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.
62 63 64 |
# File 'lib/asana/client.rb', line 62 def method_missing(m, *args, **kwargs, &block) @resource.public_send(m, *([@client] + args), **kwargs, &block) end |
Instance Method Details
#respond_to_missing?(m) ⇒ 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.
66 67 68 |
# File 'lib/asana/client.rb', line 66 def respond_to_missing?(m, *) @resource.respond_to?(m) end |