Class: InputSanitizer::V2::CleanField
- Inherits:
-
Object
- Object
- InputSanitizer::V2::CleanField
- Defined in:
- lib/input_sanitizer/v2/clean_field.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/input_sanitizer/v2/clean_field.rb', line 2 def call if has_key convert elsif default converter.call(default, ) elsif [:required] raise InputSanitizer::ValueMissingError else raise InputSanitizer::OptionalValueOmitted end end |