lib/dry/schema/macros/dsl.rb in dry-schema-0.2.0 vs lib/dry/schema/macros/dsl.rb in dry-schema-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'dry/logic/operators'
require 'dry/schema/macros/core'
module Dry
@@ -66,11 +68,10 @@
# Like `each`, but prepends `array?` check
#
# @api public
def array(*args, &block)
- value(:array)
- append_macro(Macros::Each) do |macro|
+ append_macro(Macros::Array) do |macro|
macro.value(*args, &block)
end
end
private