Exception: Voog::MovedPermanently

Inherits:
StandardError
  • Object
show all
Defined in:
lib/voog_api/error.rb

Overview

Raised when Voog API returns a 301 HTTP status code

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/voog_api/error.rb', line 5

def response
  @response
end