lib/dry/schema/message.rb in dry-schema-0.3.0 vs lib/dry/schema/message.rb in dry-schema-0.4.0

- old
+ new

@@ -9,11 +9,11 @@ # # @api public class Message include Dry::Equalizer(:predicate, :path, :text, :options) - attr_reader :predicate, :path, :text, :rule, :args, :options + attr_reader :predicate, :path, :text, :args, :options # A message sub-type used by OR operations # # @api public class Or @@ -41,11 +41,11 @@ # Return a string representation of the message # # @api public def to_s - uniq.join(" #{messages[:or].()} ") + uniq.join(" #{messages[:or]} ") end # @api private def each(&block) to_a.each(&block) @@ -65,18 +65,13 @@ end # @api private def initialize(predicate, path, text, options) @predicate = predicate - @path = path.dup + @path = path @text = text @options = options - @rule = options[:rule] @args = options[:args] || EMPTY_ARRAY - - if predicate == :key? - @path << rule - end end # Return a string representation of the message # # @api public