Exception: Voog::MovedPermanently
- Inherits:
-
StandardError
- Object
- StandardError
- Voog::MovedPermanently
- Defined in:
- lib/voog_api/error.rb
Overview
Raised when Voog API returns a 301 HTTP status code
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, hostname) ⇒ MovedPermanently
constructor
A new instance of MovedPermanently.
Constructor Details
#initialize(response, hostname) ⇒ MovedPermanently
Returns a new instance of MovedPermanently.
7 8 9 10 |
# File 'lib/voog_api/error.rb', line 7 def initialize(response, hostname) @response = response super("#{hostname} is permanently redirected to #{response.headers['location'] if response}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/voog_api/error.rb', line 5 def response @response end |