title: Creating placeholder tags for dynamic variables in Ruby
body: <p>I looking for a way to define a set of placeholder/merge tags or implement a DSL where a set of template tags used in a view file would be dynamically substituted for conditional variable values.</p>
  
  <p>For instance the template may look like this:</p>
  
  <pre><code>The quick &lt;&lt;COLOR&gt;&gt; &lt;&lt;ANIMAL_1&gt;&gt; jumps over the lazy &lt;&lt;ANIMAL_2&gt;&gt;
  </code></pre>
  
  <p>And the output of course resulting in:</p>
  
  <pre><code>The quick brown fox jumps over the lazy dog
  </code></pre>
  
  <p>This is beyond using &lt;%= animal.color %> in an ERB template. In this case  a user should ideally be able to use these tags in a form input with the tag alias saved with the rest of the text in the database.</p>
  
  <p>I'm not sure how to refer to these tags so here's an example from the Mandrill documentation on their own "merge tag" feature:  <a href="https://mandrill.zendesk.com/hc/en-us/articles/205582487-How-to-Use-Merge-Tags-to-Add-Dynamic-Content" rel="nofollow noreferrer">How to Use Merge Tags to Add Dynamic Content</a></p>
  
  <p>Are there any existing gems that can do this?  If not, how might I implement something similar?</p>