Sha256: 053ad35839267552d0770221bd05a60d775ded867acb4aba256de45efb77ea3c
Contents?: true
Size: 393 Bytes
Versions: 1
Compression:
Stored size: 393 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].all? do |method| Helpers.call_method!(@attorney, method, defendant) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
object_attorney-3.0.2 | lib/object_attorney/validations/custom.rb |