title: Passing options to template function in thor
body: <p>I am looking for a way to pass options to the ERB templating engine in thors template action.</p>
  
  <p>I stumbled upon the bundler cli source where thors template action is being used like this:</p>
  
  <pre><code>opts = {:name =&gt; name, 
      :constant_name =&gt; constant_name, 
      :constant_array =&gt; constant_array, 
      :author_name =&gt; author_name, 
      :author_email =&gt; author_email
  }
  
  template(File.join("newgem/Gemfile.tt"),
             File.join(target, "Gemfile"),
              opts)
  </code></pre>
  
  <p>But when I add options like this in my thor tasks they are not found by ERB, i can only use arguments and functions in my thor class to set variables in the template.</p>
  
  <p>I have no clue how binding works in ruby, maybe there is a way to pass a scope through binding to ERB. </p>