Sha256: f453026482fb2dae5d2f25c1e88153f88bf349b4796b16bc634f551574088f9b
Contents?: true
Size: 254 Bytes
Versions: 46
Compression:
Stored size: 254 Bytes
Contents
module Validatable class ValidatesTrueFor < ValidationBase #:nodoc: required_option :logic def valid?(instance) instance.instance_eval(&logic) == true end def message(instance) super || "is invalid" end end end
Version data entries
46 entries across 46 versions & 12 rubygems