Class: Rest::BaseResponseWrapper
- Inherits:
-
Object
- Object
- Rest::BaseResponseWrapper
- Defined in:
- lib/rest/wrappers/base_wrapper.rb
Direct Known Subclasses
Wrappers::ExconResponseWrapper, Wrappers::InternalClientResponseWrapper, Wrappers::NetHttpPersistentResponseWrapper, Wrappers::RestClientResponseWrapper, Wrappers::TyphoeusResponseWrapper
Instance Attribute Summary collapse
-
#tries ⇒ Object
Returns the value of attribute tries.
Instance Method Summary collapse
-
#headers ⇒ Object
Provide a headers_orig method in your wrapper to allow this to work.
Instance Attribute Details
#tries ⇒ Object
Returns the value of attribute tries.
39 40 41 |
# File 'lib/rest/wrappers/base_wrapper.rb', line 39 def tries @tries end |
Instance Method Details
#headers ⇒ Object
Provide a headers_orig method in your wrapper to allow this to work
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/rest/wrappers/base_wrapper.rb', line 42 def headers new_h = {} headers_orig.each_pair do |k, v| if v.is_a?(Array) && v.size == 1 v = v[0] end new_h[k.downcase] = v end new_h end |