File: file.rb [mechanize-2.7.2 Documentation]

Last Modified
  2014-03-27 02:38:46 +0000
Requires

## Description

This is the base class for the Pluggable Parsers. If Mechanize cannot find an appropriate class to use for the content type, this class will be used. For example, if you download an image/jpeg, Mechanize will not know how to parse it, so this class will be instantiated.

This is a good class to use as the base class for building your own pluggable parsers.

## Example

    require 'mechanize'

    agent = Mechanize.new
    agent.get('http://example.com/foo.jpg').class  #=> Mechanize::File