Exception: Filterameter::Exceptions::UndeclaredParameterError

Inherits:
FilterameterError
  • Object
show all
Defined in:
lib/filterameter/exceptions/undeclared_parameter_error.rb

Overview

Undeclared Parameter Error

Class UndeclaredParameterError is raised when a request contains filter parameters that have not been declared. Configuration setting ‘action_on_undeclared_parameters` determines whether or not the exception is raised.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keys) ⇒ UndeclaredParameterError

Returns a new instance of UndeclaredParameterError.



12
13
14
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 12

def initialize(keys)
  @keys = keys
end

Instance Attribute Details

#keysObject (readonly)

Returns the value of attribute keys.



10
11
12
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 10

def keys
  @keys
end

Instance Method Details

#messageObject



16
17
18
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 16

def message
  "The following filter parameter(s) have not been declared: #{keys}"
end