Exception: Mechanize::ContentTypeError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mechanize/content_type_error.rb

Overview

Synopsis

This class contains an error for when a pluggable parser tries to parse a content type that it does not know how to handle. For example if Mechanize::Page were to try to parse a PDF, a ContentTypeError would be thrown.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content_type) ⇒ ContentTypeError

Returns a new instance of ContentTypeError.



10
11
12
# File 'lib/mechanize/content_type_error.rb', line 10

def initialize(content_type)
  @content_type = content_type
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



8
9
10
# File 'lib/mechanize/content_type_error.rb', line 8

def content_type
  @content_type
end