Exception: Sinatra::Rabbit::Validator::InvalidValue

Inherits:
ValidationError
  • Object
show all
Defined in:
lib/sinatra/rabbit/validator.rb

Instance Attribute Summary

Attributes inherited from ValidationError

#http_status_code

Instance Method Summary collapse

Constructor Details

#initialize(param_def, current_value) ⇒ InvalidValue

Returns a new instance of InvalidValue.



36
37
38
39
40
41
# File 'lib/sinatra/rabbit/validator.rb', line 36

def initialize(param_def, current_value)
  super(400, "Parameter '%s' value '%s' not found in list of allowed values [%s]" % [param_def.name,
                                                                              current_value, 
                                                                              param_def.values.join(',')]
       )
end