| Class | Mechanize::FileSaver |
| In: |
lib/mechanize/file_saver.rb
|
| Parent: | File |
This is a pluggable parser that automatically saves every file it encounters. It saves the files as a tree, reflecting the host and file path.
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
agent.pluggable_parser.pdf = Mechanize::FileSaver
agent.get('http://example.com/foo.pdf')
| filename | [R] |