Class: Resterl::GenericRequest
- Inherits:
-
Object
- Object
- Resterl::GenericRequest
- Defined in:
- lib/resterl/generic_request.rb
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_HEADERS =
{}
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#response ⇒ Object
Returns the value of attribute response.
-
#rest_client ⇒ Object
Returns the value of attribute rest_client.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(client, url, query_params, headers) ⇒ GenericRequest
constructor
A new instance of GenericRequest.
Constructor Details
#initialize(client, url, query_params, headers) ⇒ GenericRequest
Returns a new instance of GenericRequest.
9 10 11 12 13 14 |
# File 'lib/resterl/generic_request.rb', line 9 def initialize client, url, query_params, headers @rest_client = client @url = url @query_params = query_params @headers = DEFAULT_HEADERS.merge headers end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
6 7 8 |
# File 'lib/resterl/generic_request.rb', line 6 def body @body end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/resterl/generic_request.rb', line 6 def response @response end |
#rest_client ⇒ Object
Returns the value of attribute rest_client.
6 7 8 |
# File 'lib/resterl/generic_request.rb', line 6 def rest_client @rest_client end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/resterl/generic_request.rb', line 6 def url @url end |