lib/dry/schema/macros/value.rb in dry-schema-1.8.0 vs lib/dry/schema/macros/value.rb in dry-schema-1.9.0

- old
+ new

@@ -9,10 +9,14 @@ # A macro used for specifying predicates to be applied to values from a hash # # @api private class Value < DSL # @api private + # + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Metrics/PerceivedComplexity def call(*args, **opts, &block) types, predicates = args.partition { |arg| arg.is_a?(Dry::Types::Type) } constructor = types.select { |type| type.is_a?(Dry::Types::Constructor) }.reduce(:>>) schema = predicates.detect { |predicate| predicate.is_a?(Processor) } @@ -63,9 +67,12 @@ each(type_spec.type.member) if type_spec.respond_to?(:member) self end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/PerceivedComplexity # @api private def array_type?(type) primitive_inferrer[type].eql?([::Array]) end