lib/dry/schema/messages/namespaced.rb in dry-schema-0.2.0 vs lib/dry/schema/messages/namespaced.rb in dry-schema-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Dry
module Schema
module Messages
# Namespaced messages backend
#
@@ -58,10 +60,10 @@
super(tokens.merge(root: "#{tokens[:root]}.#{namespace}")) + super
end
def rule_lookup_paths(tokens)
base_paths = messages.rule_lookup_paths(tokens)
- base_paths.map { |key| key.gsub("dry_schema", "dry_schema.#{namespace}") } + base_paths
+ base_paths.map { |key| key.gsub('dry_schema', "dry_schema.#{namespace}") } + base_paths
end
end
end
end
end