Class: Rosebud::Validations::TypeValidator
- Inherits:
-
Rosebud::Validator
- Object
- Rosebud::Validator
- Rosebud::Validations::TypeValidator
- Defined in:
- lib/rosebud/validations/type_validator.rb
Instance Method Summary collapse
Methods inherited from Rosebud::Validator
Instance Method Details
#validate_param(name, value, type) ⇒ Object
4 5 6 7 |
# File 'lib/rosebud/validations/type_validator.rb', line 4 def validate_param(name, value, type) coerced_value = coerce_value(type, value) error!(:type, param: name) unless valid_type?(type, coerced_value) end |