Module: Down::Httpx::DownloadedFile
- Defined in:
- lib/down/httpx.rb
Overview
Defines some additional attributes for the returned Tempfile.
Instance Attribute Summary collapse
-
#charset ⇒ Object
Returns the value of attribute charset.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#charset ⇒ Object
Returns the value of attribute charset.
169 170 171 |
# File 'lib/down/httpx.rb', line 169 def charset @charset end |
#content_type ⇒ Object
Returns the value of attribute content_type.
169 170 171 |
# File 'lib/down/httpx.rb', line 169 def content_type @content_type end |
#headers ⇒ Object
Returns the value of attribute headers.
169 170 171 |
# File 'lib/down/httpx.rb', line 169 def headers @headers end |
#url ⇒ Object
Returns the value of attribute url.
169 170 171 |
# File 'lib/down/httpx.rb', line 169 def url @url end |
Instance Method Details
#original_filename ⇒ Object
171 172 173 174 |
# File 'lib/down/httpx.rb', line 171 def original_filename Utils.filename_from_content_disposition(headers["Content-Disposition"]) || Utils.filename_from_path(URI.parse(url).path) end |