Sha256: fa559e812a9936cfd23d62ea4592f073fc8d834c9d5500fe3e0ce09a51c84118
Contents?: true
Size: 436 Bytes
Versions: 11
Compression:
Stored size: 436 Bytes
Contents
module Judge module EachValidator require 'set' def self.included(base) base.send(:cattr_accessor, :messages_to_lookup) { Set.new } base.send(:extend, ClassMethods) end module ClassMethods def uses_messages(*keys) self.messages_to_lookup.merge(keys) end end end end ::ActiveModel::EachValidator.send(:include, Judge::EachValidator) if defined?(::ActiveModel::EachValidator)
Version data entries
11 entries across 11 versions & 1 rubygems