lib/dry/schema/extensions/hints/message_set_methods.rb in dry-schema-0.3.0 vs lib/dry/schema/extensions/hints/message_set_methods.rb in dry-schema-0.4.0
- old
+ new
@@ -9,22 +9,17 @@
# @api private
def initialize(messages, options = EMPTY_HASH)
super
@hints = messages.select(&:hint?)
+ @failures = options.fetch(:failures, true)
end
# @api public
def to_h
- failures? ? messages_map : messages_map(hints)
+ failures ? messages_map : messages_map(hints)
end
alias_method :to_hash, :to_h
- alias_method :dump, :to_h
-
- # @api private
- def failures?
- options[:failures].equal?(true)
- end
end
end
end
end
end