Class: WEB_API::Client

Inherits:
WebApi
  • Object
show all
Defined in:
lib/web_api/client.rb

Direct Known Subclasses

Signet

Instance Attribute Summary collapse

Attributes inherited from WebApi

#webmethods

Instance Method Summary collapse

Methods inherited from WebApi

#_url, #add, #method_missing, trace, trace=

Constructor Details

#initialize(client, *args) ⇒ Client



17
18
19
20
# File 'lib/web_api/client.rb', line 17

def initialize(client, *args)
  @client = client
  super(*args)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class WEB_API::WebApi

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



16
17
18
# File 'lib/web_api/client.rb', line 16

def client
  @client
end

Instance Method Details

#_add(method, uri, type) ⇒ Object



22
23
24
# File 'lib/web_api/client.rb', line 22

def _add(method, uri, type)
  webmethods[method] = ClientMethod.new(@client, uri, type)
end