Sha256: da6e21bccc11d1e8057f559dc13cf15210d893d0ddaff3ab7ccd65ac794d3247
Contents?: true
Size: 455 Bytes
Versions: 7
Compression:
Stored size: 455 Bytes
Contents
# frozen_string_literal: true module Strict module Validators class AllOf attr_reader :subvalidators def initialize(*subvalidators) @subvalidators = subvalidators end def ===(value) subvalidators.all? do |subvalidator| subvalidator === value end end def inspect "AllOf(#{subvalidators.map(&:inspect).join(', ')})" end alias to_s inspect end end end
Version data entries
7 entries across 7 versions & 1 rubygems