Exception: Daredevil::Errors::UnknownHTTPStatus

Inherits:
StandardError
  • Object
show all
Includes:
Utils::RackHelper
Defined in:
lib/daredevil/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ UnknownHTTPStatus

Returns a new instance of UnknownHTTPStatus.



10
11
12
13
# File 'lib/daredevil/errors.rb', line 10

def initialize(status)
  @status = status
  super(message)
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#messageObject



15
16
17
18
# File 'lib/daredevil/errors.rb', line 15

def message
  "Unknown HTTP status code '#{status}'.\n"\
  "Available status codes and symbols are: #{statuses}"
end