Exception: ValidateMyRoutes::Errors::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/validate_my_routes/errors.rb

Overview

Basic error raised for validation failures

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code) ⇒ ValidationError

Returns a new instance of ValidationError.



25
26
27
28
29
# File 'lib/validate_my_routes/errors.rb', line 25

def initialize(message, status_code)
  super(message)
  @status_code = status_code
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



24
25
26
# File 'lib/validate_my_routes/errors.rb', line 24

def message
  @message
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



24
25
26
# File 'lib/validate_my_routes/errors.rb', line 24

def status_code
  @status_code
end