Exception: Locomotive::Steam::RedirectionException

Inherits:
Exception
  • Object
show all
Defined in:
lib/locomotive/steam/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, permanent: false) ⇒ RedirectionException

Returns a new instance of RedirectionException.



10
11
12
13
14
# File 'lib/locomotive/steam/errors.rb', line 10

def initialize(url, permanent: false)
  @url        = url
  @permanent  = permanent
  super("Redirect to #{url} (#{permanent ? '301': '302'})")
end

Instance Attribute Details

#permanentObject (readonly)

Returns the value of attribute permanent.



8
9
10
# File 'lib/locomotive/steam/errors.rb', line 8

def permanent
  @permanent
end

#urlObject (readonly)

Returns the value of attribute url.



8
9
10
# File 'lib/locomotive/steam/errors.rb', line 8

def url
  @url
end