title: How to use if (without else) statement for multiple lines of code?
body: <p><a href="https://stackoverflow.com/questions/10339149/is-there-a-shorthand-if-without-else-statement-in-ruby-on-rails">This question</a> taught me how I can use an if statement without an else. I need the exact same thing, but for mutiple lines of code instead of one line of code.</p>
  
  <p>I have tried this, but this does not seem to work:</p>
  
  <pre><code>def self.foo(a)
      {
      #mutiple lines of code
      }if a == true
  end
  </code></pre>