lib/dry/schema/macros/maybe.rb in dry-schema-1.4.3 vs lib/dry/schema/macros/maybe.rb in dry-schema-1.5.0
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require 'dry/schema/macros/dsl'
+require "dry/schema/macros/dsl"
module Dry
module Schema
module Macros
# Macro used to specify predicates for a value that can be `nil`
@@ -10,14 +10,14 @@
# @api private
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