I have many strings following a certain pattern:
string = "Hello, @name. You did @thing." # example
Basically, my strings are a description where @word is dynamically. I need to replace each with a value at runtime.
string = "Hello, #{@name}. You did #{@thing}." # Is not an option!
The @word is basically a variable, but I just cannot use the method above. How should I do that?
[ruby] replace string hash. The solution can be as simple (one-two inline expressions) or as complex (template library) as desired.