Module: Down::Http::DownloadedFile
- Defined in:
- lib/down/http.rb
Overview
Defines some additional attributes for the returned Tempfile.
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
139 140 141 |
# File 'lib/down/http.rb', line 139 def headers @headers end |
#url ⇒ Object
Returns the value of attribute url.
139 140 141 |
# File 'lib/down/http.rb', line 139 def url @url end |
Instance Method Details
#charset ⇒ Object
150 151 152 |
# File 'lib/down/http.rb', line 150 def charset HTTP::ContentType.parse(headers["Content-Type"]).charset end |
#content_type ⇒ Object
146 147 148 |
# File 'lib/down/http.rb', line 146 def content_type HTTP::ContentType.parse(headers["Content-Type"]).mime_type end |
#original_filename ⇒ Object
141 142 143 144 |
# File 'lib/down/http.rb', line 141 def original_filename Utils.filename_from_content_disposition(headers["Content-Disposition"]) || Utils.filename_from_path(HTTP::URI.parse(url).path) end |