# File lib/i18n/interpolate/ruby.rb, line 18 def interpolate_hash(string, values) string.gsub(INTERPOLATION_PATTERN) do |match| if match == '%%' '%' else key = ($1 || $2).to_sym value = values.key?(key) ? values[key] : raise(MissingInterpolationArgument.new(values, string)) value = value.call(values) if value.respond_to?(:call) $3 ? sprintf("%#{$3}", value) : value end end end