title: Understanding Calling Variables in Ruby
body: <p>I'm trying to understand what's happening here in this short little snippet, but I'm not well versed in Ruby. Ultimately, what I'm trying to figure out is what's the difference between .path and [:path]?</p>
  
  <pre><code>if(hit.props &amp;&amp; hit.props.path)
        original_path = hit.props[:path]
  </code></pre>
  
  <p>I understand the if-statement part. Check if hit has props, and if it does check to see if it also has path in the props. I'm just confused as to what [:path] is trying to accomplish.</p>