Module: Webbed::Helpers::ResponseHeadersHelper
- Included in:
- Response
- Defined in:
- lib/webbed/helpers/response_headers_helper.rb
Overview
Response helper for Response Headers
Instance Method Summary collapse
-
#age ⇒ Fixnum?
The Age of the Response (as defined in the Age Header).
-
#age=(age)
Sets the Age of the Response (as defined in the Age Header).
-
#etag ⇒ String?
The ETag of the Response (as defined in the ETag Header).
-
#etag=(etag)
Sets the ETag of the Response (as defined in the ETag Header).
-
#location ⇒ Addressable::URI?
The Location of the Response (as defined in the Location Header).
-
#location=(location)
Sets the Location of the Response (as defined in the Location Header).
Instance Method Details
#age ⇒ Fixnum?
The Age of the Response (as defined in the Age Header)
22 23 24 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 22 def age headers['Age'] ? headers['Age'].to_i : nil end |
#age=(age)
Sets the Age of the Response (as defined in the Age Header)
29 30 31 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 29 def age=(age) headers['Age'] = age.to_s end |
#etag ⇒ String?
The ETag of the Response (as defined in the ETag Header)
8 9 10 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 8 def etag headers['ETag'] end |
#etag=(etag)
Sets the ETag of the Response (as defined in the ETag Header)
15 16 17 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 15 def etag=(etag) headers['ETag'] = etag end |
#location ⇒ Addressable::URI?
The Location of the Response (as defined in the Location Header)
36 37 38 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 36 def location headers['Location'] ? Addressable::URI.parse(headers['Location']) : nil end |
#location=(location)
Sets the Location of the Response (as defined in the Location Header)
43 44 45 |
# File 'lib/webbed/helpers/response_headers_helper.rb', line 43 def location=(location) headers['Location'] = location.to_s end |