lib/dry/schema/macros/maybe.rb in dry-schema-0.2.0 vs lib/dry/schema/macros/maybe.rb in dry-schema-0.3.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'dry/schema/macros/dsl' module Dry module Schema module Macros @@ -8,14 +10,14 @@ # @api public class Maybe < DSL # @api private def call(*args, **opts, &block) if args.include?(:empty?) - raise ::Dry::Schema::InvalidSchemaError, "Using maybe with empty? predicate is invalid" + raise ::Dry::Schema::InvalidSchemaError, 'Using maybe with empty? predicate is invalid' end if args.include?(:nil?) - raise ::Dry::Schema::InvalidSchemaError, "Using maybe with nil? predicate is redundant" + raise ::Dry::Schema::InvalidSchemaError, 'Using maybe with nil? predicate is redundant' end value(*args, **opts, &block) self