Sha256: f4a771e70eab2956bbd326a1c548d6f206a167b4961f535731abb7dded79f23c
Contents?: true
Size: 272 Bytes
Versions: 5
Compression:
Stored size: 272 Bytes
Contents
# frozen_string_literal: true module SimpleValidate class ValidatesExclusionOf < ValidatesSetBase def valid?(instance) raise ArgumentError if set.empty? || !options.fetch(:in).is_a?(Array) !set.include?(instance.send(attribute).to_s) end end end
Version data entries
5 entries across 5 versions & 1 rubygems