Module: ParamsSanitizer::Sanitizers::RejectRegex::SanitizerMethods
- Defined in:
- lib/params_sanitizer/sanitizers/reject_regex.rb
Instance Method Summary collapse
-
#reject_regex(key, default_value, regex) ⇒ Object
Define rule of reject regex.
Instance Method Details
#reject_regex(key, default_value, regex) ⇒ Object
Define rule of reject regex.
45 46 47 48 49 |
# File 'lib/params_sanitizer/sanitizers/reject_regex.rb', line 45 def reject_regex(key, default_value, regex) check_duplicated_definition!(key) definitions[:reject_regex] ||= Hash.new definitions[:reject_regex][key.to_s] = { default_value: default_value, regex: regex } end |