title: Groovy String evaluation runtime
body: <p>Hi I have a String value that is populated runtime and I want to use it to construct another String.</p>
  
  <pre><code>static value= ''
  static construct = "${-&gt; value - '/'}"
  </code></pre>
  
  <p>So when I <strong>value</strong> = "/www.stackoverflow.com" , construct is equal to <em>"www.stackoverflow.com"</em></p>
  
  <p>but when I do </p>
  
  <pre><code>static value= ''
  static construct = {-&gt; value - '/'}
  </code></pre>
  
  <p><code>construct</code> is equals to <em>some closure name</em>. I am wondering what is the purpose of this? Why using closure,GString everything is ok? And why when use only closure nothing happens?</p>
  
  <p><em>Edited:</em>
  The value is changed from this method call.</p>
  
  <pre><code>def someCoplmexMethod(){
     value="/www.stackoverflow.com"
  }
  </code></pre>