lib/dry/schema/macros/filled.rb in dry-schema-0.2.0 vs lib/dry/schema/macros/filled.rb in dry-schema-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'dry/schema/macros/value'
module Dry
module Schema
module Macros
@@ -7,14 +9,14 @@
#
# @api public
class Filled < Value
def call(*predicates, **opts, &block)
if predicates.include?(:empty?)
- raise ::Dry::Schema::InvalidSchemaError, "Using filled with empty? predicate is invalid"
+ raise ::Dry::Schema::InvalidSchemaError, 'Using filled with empty? predicate is invalid'
end
if predicates.include?(:filled?)
- raise ::Dry::Schema::InvalidSchemaError, "Using filled with filled? is redundant"
+ raise ::Dry::Schema::InvalidSchemaError, 'Using filled with filled? is redundant'
end
if opts[:type_spec].equal?(true)
value(predicates[0], :filled?, *predicates[1..predicates.size-1], **opts, &block)
else