Skip to main content

ruby_template_to_interpolation

Function ruby_template_to_interpolation 

Source
pub fn ruby_template_to_interpolation(template: &str) -> String
Expand description

Convert a {param} template string to a Ruby double-quoted string with #{param} interpolation.

{key} placeholders are converted to #{key}. All other characters are escaped for Ruby double-quoted strings. The returned value does NOT include the surrounding " quotes.