Sha256: 479904ab2c5fe9edde24f958584e9e049e002407bd527e0e1b8e2c14b4ed5c06
Contents?: true
Size: 664 Bytes
Versions: 10
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true require 'delegate' module MediaTypes class Scheme class CaseEqualityWithList < SimpleDelegator # True for Enumerable#any? {Object#===} def ===(other) any? { |it| it === other } # rubocop:disable Style/CaseEquality end end # noinspection RubyInstanceMethodNamingConvention ## # Allows +it+ to be any of the wrapped +klazzes+ # # @param [Array<Class>] klazzes the classes that are valid for +it+ # @return [CaseEqualityWithList] def AnyOf(*klazzes) # rubocop:disable Naming/MethodName CaseEqualityWithList.new(klazzes) end end end
Version data entries
10 entries across 10 versions & 1 rubygems