Exception: RequestParamsValidation::MissingParameterError

Inherits:
RequestParamError show all
Defined in:
lib/request_params_validation/exceptions/validator_errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ MissingParameterError

Returns a new instance of MissingParameterError.



7
8
9
10
11
12
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 7

def initialize(options)
  @param_key   = options[:param_key]
  @param_type  = options[:param_type]

  super(message)
end

Instance Attribute Details

#param_keyObject (readonly)

Returns the value of attribute param_key.



5
6
7
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 5

def param_key
  @param_key
end

#param_typeObject (readonly)

Returns the value of attribute param_type.



5
6
7
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 5

def param_type
  @param_type
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 14

def message
  "The parameter '#{param_key}' is missing"
end