Class: RestApiClient::Client
- Inherits:
-
Object
- Object
- RestApiClient::Client
- Includes:
- Configuration, Request, Response
- Defined in:
- lib/rest_api_client/client.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#options ⇒ Object
Returns the value of attribute options.
Attributes included from Configuration
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ Client
constructor
A new instance of Client.
Methods included from Configuration
#default_middleware_config, #default_options
Methods included from Response
Methods included from Request
Constructor Details
#initialize(options = {}, &block) ⇒ Client
Returns a new instance of Client.
17 18 19 20 21 |
# File 'lib/rest_api_client/client.rb', line 17 def initialize ( = {}, &block) = .merge() middleware_config = block_given? ? block : default_middleware_config @connection = Faraday.new(, &middleware_config) end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
15 16 17 |
# File 'lib/rest_api_client/client.rb', line 15 def connection @connection end |
#options ⇒ Object
Returns the value of attribute options.
15 16 17 |
# File 'lib/rest_api_client/client.rb', line 15 def end |