Sha256: d43984c30f6eba9ebcdc76fa481323d0dd5e20827404084369b4717c1b7cb8cd
Contents?: true
Size: 359 Bytes
Versions: 1
Compression:
Stored size: 359 Bytes
Contents
module ObjectAttorney module Validations class Custom attr_reader :options attr_writer :attorney def initialize(args) @methods = args @options = args.extract_options! end def validate(defendant) [*@methods].map { |method| @attorney.send(method, defendant) }.all? end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
object_attorney-3.0.0 | lib/object_attorney/validations/custom.rb |