Module: Down::Wget::DownloadedFile
- Defined in:
- lib/down/wget.rb
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.
203 204 205 |
# File 'lib/down/wget.rb', line 203 def headers @headers end |
#url ⇒ Object
Returns the value of attribute url.
203 204 205 |
# File 'lib/down/wget.rb', line 203 def url @url end |
Instance Method Details
#charset ⇒ Object
213 214 215 |
# File 'lib/down/wget.rb', line 213 def charset headers["Content-Type"].to_s[/;\s*charset=([^;]+)/i, 1] end |
#content_type ⇒ Object
209 210 211 |
# File 'lib/down/wget.rb', line 209 def content_type headers["Content-Type"].to_s.split(";").first end |
#original_filename ⇒ Object
205 206 207 |
# File 'lib/down/wget.rb', line 205 def original_filename filename_from_content_disposition || filename_from_url end |