Class | Mechanize::DirectorySaver |
In: |
lib/mechanize/directory_saver.rb
|
Parent: | Mechanize::Download |
Unlike Mechanize::FileSaver, the directory saver places all downloaded files in a single pre-specified directory.
You must register the directory to save to before using the directory saver:
agent.pluggable_parser['image'] = # Mechanize::DirectorySaver.save_to 'images'
Saves the body_io into the directory specified for this DirectorySaver by save_to. The filename is chosen by Mechanize::Parser#extract_filename.
Creates a DirectorySaver subclass that will save responses to the given directory.