Sha256: ebf8ce18f8374a5ee763a32a287946da72e4f65136cb187e41882d447a6fb20f
Contents?: true
Size: 399 Bytes
Versions: 5
Compression:
Stored size: 399 Bytes
Contents
module ComposedValidations class PropertyValidator attr_reader :property, :validators def initialize(property, validators) @property = property @validators = Array(validators) end def decorate_resource(resource) validators.each do |validator| resource = WithValidatedProperty.new(resource, property, validator) end resource end end end
Version data entries
5 entries across 5 versions & 1 rubygems