title: How to properly set an instance variable with instance_variable_set?
body: <p>I was looking through the docs for <a href="http://apidock.com/ruby/Object/instance_variable_set" rel="noreferrer">instance_variable_set</a> and saw that the sample code given does this:</p>
  
  <pre><code>obj.instance_variable_set(:@instnc_var, "value for the instance variable")
  </code></pre>
  
  <p>which then allows you to access the variable as @instnc_var in any of the class's instance methods.</p>
  
  <p>I'm wondering why there needs to be a colon <code>:</code> before the <code>@instnc_var</code>. What does the colon do?</p>