title: How are symbols used to identify arguments in ruby methods
body: <p>I am learning rails and going back to ruby to understand how methods in rails (and ruby really work). When I see method calls like:</p>
  <pre><code>validates :first_name, :presence =&gt; true
  </code></pre>
  <p>I get confused. How do you write methods in ruby that accept symbols or hashes. The source code for the validates method is confusing too. Could someone please simplify this topic of using symbols as arguments in ruby class and instance methods for me?</p>
  <p>UPDATE:</p>
  <p>Good one @Dave! But What I was trying out was something like:</p>
  <pre><code>def full_name (:first_name, :last_name)
    @first_name = :first_name
    @last_name = :last_name
    p &quot;#{@first_name} #{last_name}&quot;
  end
  
  full_name(&quot;Breta&quot;, &quot;Von Sustern&quot;)
  </code></pre>
  <p>Which obviously raises errors. I am trying to understand: Why is passing symbols like this as arguments wrong if symbols are just like any other value?</p>