Exception: Biblionet::Extractors::EmptyPageError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bookshark/extractors/base.rb

Overview

Raised when a page is considered empty.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_lengthObject (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

#urlObject (readonly)

Returns the value of attribute url.



162
163
164
# File 'lib/bookshark/extractors/base.rb', line 162

def url
  @url
end