Exception: Gh::Trending::Parsers::HtmlChangedError
- Inherits:
-
StandardError
- Object
- StandardError
- Gh::Trending::Parsers::HtmlChangedError
- Defined in:
- lib/gh_trending/parsers/html_changed_error.rb
Overview
Class indicating that perhaps the HTML of the trending has changed for whatever reason.
Instance Attribute Summary collapse
-
#page_that_changed ⇒ Object
readonly
Returns the value of attribute page_that_changed.
Instance Method Summary collapse
-
#initialize(page_that_changed, msg = nil) ⇒ HtmlChangedError
constructor
A new instance of HtmlChangedError.
Constructor Details
#initialize(page_that_changed, msg = nil) ⇒ HtmlChangedError
Returns a new instance of HtmlChangedError.
11 12 13 14 15 16 17 18 19 |
# File 'lib/gh_trending/parsers/html_changed_error.rb', line 11 def initialize(page_that_changed, msg = nil) @page_that_changed = page_that_changed page_changed_human_format = build_human_format_page_changed msg ||= 'The page can\'t be crawled anymore because' \ "#{page_changed_human_format} changed its HTML format." \ 'Submit a PR to fix it!' super(msg) end |
Instance Attribute Details
#page_that_changed ⇒ Object (readonly)
Returns the value of attribute page_that_changed.
9 10 11 |
# File 'lib/gh_trending/parsers/html_changed_error.rb', line 9 def page_that_changed @page_that_changed end |