Exception: Namira::Errors::RedirectError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/namira/errors/redirect_error.rb

Overview

A RedirectError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, location, count) ⇒ RedirectError

Creates a new instance



21
22
23
24
25
# File 'lib/namira/errors/redirect_error.rb', line 21

def initialize(msg, location, count)
  super(msg)
  @location = location
  @count = count
end

Instance Attribute Details

#countInteger (readonly)

The number of redirects that occured

Returns:

  • (Integer)


17
18
19
# File 'lib/namira/errors/redirect_error.rb', line 17

def count
  @count
end

#locationString (readonly)

The location the redirect is pointing to

Returns:

  • (String)


12
13
14
# File 'lib/namira/errors/redirect_error.rb', line 12

def location
  @location
end

#messageString (readonly)

Returns Will contain information about the error.

Returns:

  • (String)

    Will contain information about the error.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/namira/errors/redirect_error.rb', line 8

class RedirectError < BaseError
  ##
  # The location the redirect is pointing to
  # @return [String]
  attr_reader :location

  ##
  # The number of redirects that occured
  # @return [Integer]
  attr_reader :count

  ##
  # Creates a new instance
  def initialize(msg, location, count)
    super(msg)
    @location = location
    @count = count
  end
end