Exception: ApiRecipes::PathParamsMismatch
- Inherits:
-
Exception
- Object
- Exception
- ApiRecipes::PathParamsMismatch
- Defined in:
- lib/api_recipes/exceptions.rb
Instance Method Summary collapse
-
#initialize(path, expected_params, provided_params) ⇒ PathParamsMismatch
constructor
A new instance of PathParamsMismatch.
Constructor Details
#initialize(path, expected_params, provided_params) ⇒ PathParamsMismatch
Returns a new instance of PathParamsMismatch.
25 26 27 28 29 30 31 32 |
# File 'lib/api_recipes/exceptions.rb', line 25 def initialize(path, expected_params, provided_params) if expected_params.size == 0 = "route '#{path}' requires NO PARAMS but #{provided_params} were provided" else = "route '#{path}' requires params #{expected_params} but #{provided_params} were provided" end super() end |