Sha256: 0728ed33416df4a61e98b192bb476530f43594c7669bee403e1502efd09f3ccd
Contents?: true
Size: 854 Bytes
Versions: 12
Compression:
Stored size: 854 Bytes
Contents
# frozen_string_literal: true module Leftovers module ProcessorBuilders module Argument def self.build(patterns, then_processor) # rubocop:disable Metrics/MethodLength ::Leftovers::ProcessorBuilders::EachAction.each_or_self(patterns) do |pattern| case pattern when ::Integer ::Leftovers::ValueProcessors::PositionalArgument.new(pattern, then_processor) when '*' ::Leftovers::ValueProcessors::EachPositionalArgument.new(then_processor) when '**' ::Leftovers::ValueProcessors::EachKeywordArgument.new(then_processor) when ::String, ::Hash ::Leftovers::ProcessorBuilders::KeywordArgument.build(pattern, then_processor) # :nocov: else raise # :nocov: end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems