module Dry::Schema::Extensions::Hints::MessageSetMethods
def initialize(messages, options = EMPTY_HASH)
- Api: - private
def initialize(messages, options = EMPTY_HASH) super @hints = messages.select(&:hint?) @failures = options.fetch(:failures, true) end
def to_h
- Api: - public
Returns:
-
(Hash
-Array >)
Other tags:
- See: ResultMethods#hints -
See: MessageSet#to_h -
def to_h @to_h ||= failures ? messages_map : messages_map(hints) end