module Down::Wget::DownloadedFile
Attributes
headers[RW]
url[RW]
Public Instance Methods
charset()
click to toggle source
# File lib/down/wget.rb, line 220 def charset headers["Content-Type"].to_s[/;\s*charset=([^;]+)/i, 1] end
content_type()
click to toggle source
# File lib/down/wget.rb, line 216 def content_type headers["Content-Type"].to_s.split(";").first end
original_filename()
click to toggle source
# File lib/down/wget.rb, line 211 def original_filename Utils.filename_from_content_disposition(headers["Content-Disposition"]) || Utils.filename_from_path(URI.parse(url).path) end