Module: ComposedValidations
- Defined in:
- lib/composed_validations/decorate_properties.rb,
lib/composed_validations.rb,
lib/composed_validations/version.rb,
lib/composed_validations/or_validator.rb,
lib/composed_validations/and_validator.rb,
lib/composed_validations/or_string_joiner.rb,
lib/composed_validations/and_string_joiner.rb,
lib/composed_validations/property_validator.rb,
lib/composed_validations/validated_property.rb,
lib/composed_validations/with_validated_property.rb
Overview
Takes a resource and a hash with properties as the keys and validators as the values and decorates those validations onto the resource.
Defined Under Namespace
Classes: AndStringJoiner, AndValidator, DecorateProperties, Decorator, OrStringJoiner, OrValidator, PropertyValidator, ValidatedProperty, WithValidatedProperty
Constant Summary collapse
- VERSION =
"0.0.5"
Class Method Summary collapse
Class Method Details
.ValidatedProperty(value) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/composed_validations.rb', line 15 def ValidatedProperty(value) if value.kind_of? ValidatedProperty value else ValidatedProperty.new(value.to_sym, value.to_sym) end end |