Sha256: bddba5eff3fddac0db0644c1478f3322f806b8a4edf860497ee554bcae2d4bb9
Contents?: true
Size: 391 Bytes
Versions: 4
Compression:
Stored size: 391 Bytes
Contents
# frozen_string_literal: true module SimpleValidate class ValidatesSetBase < ValidatesBase attr_accessor :set, :options def initialize(attribute, options) self.options = options self.set = Set.new(Array(options[:in]).map(&:to_s)) super(attribute, options[:message] || "breaks inclusion/exclusion rules", options[:if] || proc { true }) end end end
Version data entries
4 entries across 4 versions & 1 rubygems