Exception: Biblionet::Extractors::EmptyPageError
- Inherits:
-
StandardError
- Object
- StandardError
- Biblionet::Extractors::EmptyPageError
- Defined in:
- lib/bookshark/extractors/base.rb
Overview
Raised when a page is considered empty.
Instance Attribute Summary collapse
-
#content_length ⇒ Object
readonly
Returns the value of attribute content_length.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, content_length) ⇒ EmptyPageError
constructor
A new instance of EmptyPageError.
Constructor Details
#initialize(url, content_length) ⇒ EmptyPageError
Returns a new instance of EmptyPageError.
164 165 166 167 168 169 170 |
# File 'lib/bookshark/extractors/base.rb', line 164 def initialize(url, content_length) @url = url @content_length = content_length msg = "Page: #{url} is only #{content_length} bytes, so it is considered EMPTY." super(msg) end |
Instance Attribute Details
#content_length ⇒ Object (readonly)
Returns the value of attribute content_length.
162 163 164 |
# File 'lib/bookshark/extractors/base.rb', line 162 def content_length @content_length end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
162 163 164 |
# File 'lib/bookshark/extractors/base.rb', line 162 def url @url end |