lib/dry/schema/messages/yaml.rb in dry-schema-1.3.4 vs lib/dry/schema/messages/yaml.rb in dry-schema-1.4.0

- old
+ new

@@ -66,9 +66,21 @@ @data = data @config = config if config @t = proc { |key, locale: default_locale| get("%<locale>s.#{key}", locale: locale) } end + # Get an array of looked up paths + # + # @param [Symbol] predicate + # @param [Hash] options + # + # @return [String] + # + # @api public + def looked_up_paths(predicate, options) + super.map { |path| path % { locale: options[:locale] || default_locale } } + end + # Get a message for the given key and its options # # @param [Symbol] key # @param [Hash] options #