Module: ActiveResourceResponse::HttpResponse
- Defined in:
- lib/active_resource_response/http_response.rb
Instance Method Summary collapse
Instance Method Details
#cookies ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/active_resource_response/http_response.rb', line 33 def unless defined? @_active_resource_response_cookies @_active_resource_response_cookies = (self.headers[:set_cookie] || {}).inject({}) do |out, | CGI::Cookie::parse().each do |key, | out[key] = .value.first unless ['expires', 'path'].include? key end out end end @_active_resource_response_cookies end |
#headers ⇒ Object
26 27 28 29 30 31 |
# File 'lib/active_resource_response/http_response.rb', line 26 def headers unless defined? @_active_resource_response_headers @_active_resource_response_headers = symbolize_keys(to_hash) end @_active_resource_response_headers end |