Exception: NewsScraper::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- NewsScraper::ResponseError
- Defined in:
- lib/news_scraper/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(opts = {}) ⇒ ResponseError
Returns a new instance of ResponseError.
6 7 8 9 10 11 |
# File 'lib/news_scraper/errors.rb', line 6 def initialize(opts = {}) @error_code = opts[:error_code] @message = opts[:message] @url = opts[:url] super end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
4 5 6 |
# File 'lib/news_scraper/errors.rb', line 4 def error_code @error_code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/news_scraper/errors.rb', line 4 def @message end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/news_scraper/errors.rb', line 4 def url @url end |