Sha256: 36a2f85ab2f5c3e7ba09e50197a73ac9bcc3507cd28a88276024a5c6ce62dd7f
Contents?: true
Size: 833 Bytes
Versions: 12
Compression:
Stored size: 833 Bytes
Contents
# frozen_string_literal: true module Leftovers module MatcherBuilders module Name def self.build(patterns) # rubocop:disable Metrics/MethodLength ::Leftovers::MatcherBuilders::Or.each_or_self(patterns) do |pat| case pat when nil when ::Array ::Leftovers::MatcherBuilders::Name.build(pat) when ::String ::Leftovers::MatcherBuilders::String.build(pat) when ::Hash unless_arg = pat.delete(:unless_arg) ::Leftovers::MatcherBuilders::AndNot.build( ::Leftovers::MatcherBuilders::StringPattern.build(**pat), ::Leftovers::MatcherBuilders::Name.build(unless_arg) ) # :nocov: else raise # :nocov: end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems